summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-integration/spec
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-integration/spec')
-rw-r--r--branches/sca-java-integration/spec/commonj/LICENSE.txt203
-rw-r--r--branches/sca-java-integration/spec/commonj/NOTICE.txt14
-rw-r--r--branches/sca-java-integration/spec/commonj/pom.xml102
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/CancelTimerListener.java38
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/StopTimerListener.java38
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/Timer.java41
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/TimerListener.java38
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/TimerManager.java79
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/RemoteWorkItem.java41
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/Work.java39
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkCompletedException.java72
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkEvent.java45
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkException.java49
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkItem.java39
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkListener.java44
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkManager.java51
-rw-r--r--branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkRejectedException.java50
-rw-r--r--branches/sca-java-integration/spec/pom.xml49
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/LICENSE.txt202
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/NOTICE.txt14
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/README.txt35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/pom.xml102
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/CompositeContext.java93
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ConversationEndedException.java67
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/CurrentCompositeContext.java50
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java68
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/RequestContext.java49
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceReference.java69
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceRuntimeException.java69
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceUnavailableException.java66
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/Version.java45
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java38
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Callback.java44
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ComponentName.java35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Constructor.java35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Context.java36
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Conversation.java51
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ConversationID.java35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Destroy.java35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EagerInit.java43
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EndConversation.java34
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Init.java36
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/OneWay.java36
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Property.java54
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Reference.java46
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Remotable.java36
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Resource.java49
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Scope.java45
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Service.java43
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-binding-sca.xsd38
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-binding-webservice.xsd39
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-core.xsd233
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-implementation-java.xsd39
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-interface-java.xsd40
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-interface-wsdl.xsd40
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca.xsd34
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/test/java/org/osoa/sca/annotations/CallbackTestCase.java70
-rw-r--r--branches/sca-java-integration/spec/sca-api-r0.95/src/test/java/org/osoa/sca/annotations/usage/CallbackType.java49
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/LICENSE.txt202
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/NOTICE.txt14
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/pom.xml87
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CallableReference.java65
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ComponentContext.java109
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CompositeContext.java95
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/Constants.java34
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/Conversation.java41
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ConversationEndedException.java67
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CurrentCompositeContext.java52
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java68
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/RequestContext.java66
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceReference.java65
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceRuntimeException.java69
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceUnavailableException.java65
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java38
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Authentication.java69
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Callback.java49
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ComponentName.java35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Confidentiality.java69
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Constructor.java35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Context.java38
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ConversationAttributes.java56
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ConversationID.java35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Conversational.java37
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Destroy.java35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/EagerInit.java35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/EndsConversation.java34
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Init.java36
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Integrity.java69
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Intent.java58
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/OneWay.java35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/PolicySets.java45
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Property.java56
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Qualifier.java35
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Reference.java50
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Remotable.java36
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Requires.java56
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Scope.java48
-rw-r--r--branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Service.java47
98 files changed, 5509 insertions, 0 deletions
diff --git a/branches/sca-java-integration/spec/commonj/LICENSE.txt b/branches/sca-java-integration/spec/commonj/LICENSE.txt
new file mode 100644
index 0000000000..6b0b1270ff
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/LICENSE.txt
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/branches/sca-java-integration/spec/commonj/NOTICE.txt b/branches/sca-java-integration/spec/commonj/NOTICE.txt
new file mode 100644
index 0000000000..d83ebbe236
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/NOTICE.txt
@@ -0,0 +1,14 @@
+${pom.name}
+Copyright (c) 2005 - 2006 The Apache Software Foundation
+
+Apache Tuscany is an effort undergoing incubation at The Apache Software
+Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is
+required of all newly accepted projects until a further review indicates that
+the infrastructure, communications, and decision making process have stabilized
+in a manner consistent with other successful ASF projects. While incubation
+status is not necessarily a reflection of the completeness or stability of the
+code, it does indicate that the project has yet to be fully endorsed by the ASF.
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/branches/sca-java-integration/spec/commonj/pom.xml b/branches/sca-java-integration/spec/commonj/pom.xml
new file mode 100644
index 0000000000..150400e286
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/pom.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1-integration-incubating-SNAPSHOT</version>
+ </parent>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>commonj-api_r${specVersion}</artifactId>
+ <version>0.1-integration-incubating-SNAPSHOT</version>
+ <packaging>osgi-bundle</packaging>
+ <name>Commonj API for Timer and Work Manager</name>
+ <description>Commonj API for Timer and Work Manager</description>
+
+ <properties>
+ <specVersion>1.1</specVersion>
+ </properties>
+
+ <!-- definition of repositories where the parent pom can be found -->
+ <repositories>
+ <repository>
+ <id>apache.snapshots</id>
+ <name>Apache Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>apache.incubator</id>
+ <name>Apache Incubator Repository</name>
+ <url>http://people.apache.org/repo/m2-incubating-repository/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.4</source>
+ <target>1.4</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix.plugins</groupId>
+ <artifactId>maven-osgi-plugin</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <extensions>true</extensions>
+ <configuration>
+ <osgiManifest>
+ <bundleName>${pom.name}</bundleName>
+ <bundleDescription>${pom.description}</bundleDescription>
+ <bundleVendor>${pom.organization.name}</bundleVendor>
+ <bundleLocalization>plugin</bundleLocalization>
+ <bundleSymbolicName>commonj.twm</bundleSymbolicName>
+ <exportPackage>commonj.timers;version="${specVersion}", commonj.work;version="${specVersion}</exportPackage>
+ </osgiManifest>
+ </configuration>
+ </plugin>
+ </plugins>
+ <defaultGoal>install</defaultGoal>
+ </build>
+</project>
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/CancelTimerListener.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/CancelTimerListener.java
new file mode 100644
index 0000000000..ba252e70dc
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/CancelTimerListener.java
@@ -0,0 +1,38 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.timers;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface CancelTimerListener extends TimerListener {
+
+ void timerCancel(Timer timer);
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/StopTimerListener.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/StopTimerListener.java
new file mode 100644
index 0000000000..92defc4bdc
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/StopTimerListener.java
@@ -0,0 +1,38 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.timers;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface StopTimerListener extends TimerListener {
+
+ void timerStop(Timer timer);
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/Timer.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/Timer.java
new file mode 100644
index 0000000000..0a5c3b65fb
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/Timer.java
@@ -0,0 +1,41 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.timers;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface Timer {
+
+ boolean cancel();
+ long getPeriod();
+ long getScheduledExecutionTime() throws IllegalStateException;
+ TimerListener getTimerListener();
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/TimerListener.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/TimerListener.java
new file mode 100644
index 0000000000..6e3733b5f4
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/TimerListener.java
@@ -0,0 +1,38 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.timers;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface TimerListener {
+
+ void timerExpired(Timer timer);
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/TimerManager.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/TimerManager.java
new file mode 100644
index 0000000000..c07b6478d5
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/timers/TimerManager.java
@@ -0,0 +1,79 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.timers;
+
+import java.util.Date;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface TimerManager {
+
+ static final long IMMEDIATE = 0;
+ static final long INDEFINITE = java.lang.Long.MAX_VALUE;
+
+ boolean isStopped();
+
+ boolean isStopping();
+
+ boolean isSuspended() throws IllegalStateException;
+
+ boolean isSuspending() throws IllegalStateException;
+
+ void resume() throws IllegalStateException;
+
+ Timer schedule(TimerListener listener, long delayInMillis)
+ throws IllegalStateException, IllegalArgumentException;
+
+ Timer schedule(TimerListener listener, long delayInMillis, long repeatIntervalInMillis)
+ throws IllegalStateException, IllegalArgumentException;
+
+ Timer schedule(TimerListener listener, Date scheduleDate)
+ throws IllegalStateException, IllegalArgumentException;
+
+ Timer schedule(TimerListener listener, Date scheduleDate, long repeatIntervalInMillis)
+ throws IllegalStateException, IllegalArgumentException;
+
+ Timer scheduleAtFixedRate(TimerListener listener, long delayInMillis, long repeatIntervalInMillis)
+ throws IllegalStateException, IllegalArgumentException;
+
+ Timer scheduleAtFixedRate(TimerListener listener, Date scheduleDate, long repeatIntervalInMillis)
+ throws IllegalStateException, IllegalArgumentException;
+
+ void stop() throws IllegalStateException;
+
+ void suspend() throws IllegalStateException;
+
+ boolean waitForStop(long timeOut)
+ throws InterruptedException, IllegalArgumentException;
+
+ boolean waitForSuspend(long timOut)
+ throws InterruptedException, IllegalStateException, IllegalArgumentException;
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/RemoteWorkItem.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/RemoteWorkItem.java
new file mode 100644
index 0000000000..aebf40a324
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/RemoteWorkItem.java
@@ -0,0 +1,41 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.work;
+
+import java.util.Collection;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface RemoteWorkItem extends WorkItem {
+
+ WorkManager getPinnedWorkManager();
+ void release();
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/Work.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/Work.java
new file mode 100644
index 0000000000..1071fe4a2e
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/Work.java
@@ -0,0 +1,39 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.work;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface Work extends Runnable {
+
+ boolean isDaemon();
+ void release();
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkCompletedException.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkCompletedException.java
new file mode 100644
index 0000000000..0edd14c8a0
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkCompletedException.java
@@ -0,0 +1,72 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.work;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Collections;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class WorkCompletedException extends WorkException {
+
+ private final List exceptionList;
+
+ public WorkCompletedException() {
+ super();
+ exceptionList = Collections.EMPTY_LIST;
+ }
+ public WorkCompletedException(String message) {
+ super(message);
+ exceptionList = Collections.EMPTY_LIST;
+ }
+ public WorkCompletedException(String message, Throwable cause) {
+ super(message, cause);
+ exceptionList = Collections.singletonList(cause);
+ }
+ public WorkCompletedException(Throwable cause) {
+ super(cause);
+ exceptionList = Collections.singletonList(cause);
+ }
+ public WorkCompletedException(String message, List list) {
+ super(message);
+ if ((list != null) && (list.size() > 0)) {
+ initCause((Throwable) list.get(0));
+ exceptionList = Collections.unmodifiableList(new ArrayList(list));
+ } else {
+ exceptionList = Collections.EMPTY_LIST;
+ }
+ }
+
+ public List getExceptionList() {
+ return exceptionList;
+ }
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkEvent.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkEvent.java
new file mode 100644
index 0000000000..9a7814b860
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkEvent.java
@@ -0,0 +1,45 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.work;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface WorkEvent {
+
+ static final int WORK_ACCEPTED = 1;
+ static final int WORK_REJECTED = 2;
+ static final int WORK_STARTED = 3;
+ static final int WORK_COMPLETED = 4;
+
+ WorkException getException();
+ int getType();
+ WorkItem getWorkItem();
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkException.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkException.java
new file mode 100644
index 0000000000..f490f2e99e
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkException.java
@@ -0,0 +1,49 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.work;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class WorkException extends Exception {
+
+ public WorkException() {
+ super();
+ }
+ public WorkException(String message) {
+ super(message);
+ }
+ public WorkException(String message, Throwable cause) {
+ super(message, cause);
+ }
+ public WorkException(Throwable cause) {
+ super(cause);
+ }
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkItem.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkItem.java
new file mode 100644
index 0000000000..6b8d3185a1
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkItem.java
@@ -0,0 +1,39 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.work;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface WorkItem extends Comparable {
+
+ Work getResult() throws WorkException;
+ int getStatus();
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkListener.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkListener.java
new file mode 100644
index 0000000000..9b523f7321
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkListener.java
@@ -0,0 +1,44 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.work;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface WorkListener {
+
+ static long IMMEDIATE = 0;
+ static long INDEFINITE = java.lang.Long.MAX_VALUE;
+
+ void workAccepted(WorkEvent event);
+ void workCompleted(WorkEvent event);
+ void workRejected(WorkEvent event);
+ void workStarted(WorkEvent event);
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkManager.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkManager.java
new file mode 100644
index 0000000000..2c4167d24c
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkManager.java
@@ -0,0 +1,51 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.work;
+
+import java.util.Collection;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface WorkManager {
+
+ static final long IMMEDIATE = 0;
+ static final long INDEFINITE = java.lang.Long.MAX_VALUE;
+
+ WorkItem schedule(Work work) throws WorkException, IllegalArgumentException;
+
+ WorkItem schedule(Work work, WorkListener listener) throws WorkException, IllegalArgumentException;
+
+ boolean waitForAll(Collection workItems, long timeout)
+ throws InterruptedException, IllegalArgumentException;
+
+ Collection waitForAny(Collection workItems, long timeout)
+ throws InterruptedException, IllegalArgumentException;
+
+}
diff --git a/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkRejectedException.java b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkRejectedException.java
new file mode 100644
index 0000000000..23dcd2294c
--- /dev/null
+++ b/branches/sca-java-integration/spec/commonj/src/main/java/commonj/work/WorkRejectedException.java
@@ -0,0 +1,50 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// This source code implements specifications defined by the BEA and IBM.
+// For more information, see:
+// http://dev2dev.bea.com/technologies/commonj/index.jsp
+// or
+// http://www.ibm.com/developerworks/library/j-commonj-sdowmt
+//
+// In order to remain compliant with the specification
+// DO NOT add / change / or delete method signatures!
+//
+
+package commonj.work;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class WorkRejectedException extends WorkException {
+
+
+ public WorkRejectedException() {
+ super();
+ }
+ public WorkRejectedException(String message) {
+ super(message);
+ }
+ public WorkRejectedException(String message, Throwable cause) {
+ super(message, cause);
+ }
+ public WorkRejectedException(Throwable cause) {
+ super(cause);
+ }
+
+}
diff --git a/branches/sca-java-integration/spec/pom.xml b/branches/sca-java-integration/spec/pom.xml
new file mode 100644
index 0000000000..33b5ff2393
--- /dev/null
+++ b/branches/sca-java-integration/spec/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.osoa</groupId>
+ <artifactId>spec</artifactId>
+ <packaging>pom</packaging>
+ <name>OSOA Specification API jars</name>
+ <version>0.1-integration-incubating-SNAPSHOT</version>
+
+ <distributionManagement>
+ <repository>
+ <id>apache.incubator</id>
+ <name>Apache Incubator Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-incubating-repository</url>
+ </repository>
+ <snapshotRepository>
+ <id>apache.snapshots</id>
+ <name>Apache Snapshot Repository</name>
+ <url>scp://people.apache.org/www/people.apache.org/repo/m2-snapshot-repository</url>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ </build>
+
+ <modules>
+ <module>commonj</module>
+ <module>sca-api-r1.0</module>
+ </modules>
+</project>
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/LICENSE.txt b/branches/sca-java-integration/spec/sca-api-r0.95/LICENSE.txt
new file mode 100644
index 0000000000..d645695673
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/NOTICE.txt b/branches/sca-java-integration/spec/sca-api-r0.95/NOTICE.txt
new file mode 100644
index 0000000000..d83ebbe236
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/NOTICE.txt
@@ -0,0 +1,14 @@
+${pom.name}
+Copyright (c) 2005 - 2006 The Apache Software Foundation
+
+Apache Tuscany is an effort undergoing incubation at The Apache Software
+Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is
+required of all newly accepted projects until a further review indicates that
+the infrastructure, communications, and decision making process have stabilized
+in a manner consistent with other successful ASF projects. While incubation
+status is not necessarily a reflection of the completeness or stability of the
+code, it does indicate that the project has yet to be fully endorsed by the ASF.
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/README.txt b/branches/sca-java-integration/spec/sca-api-r0.95/README.txt
new file mode 100644
index 0000000000..9b26d1690a
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/README.txt
@@ -0,0 +1,35 @@
+Apache Tuscany M1 build (May, 2006)
+===================================
+
+http://incubator.apache.org/tuscany/
+
+Tuscany is an effort undergoing incubation at the Apache Software Foundation
+(ASF), sponsored by the Web Services PMC.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness or
+stability of the code, it does indicate that the project has yet to be fully
+endorsed by the ASF.
+
+
+Support
+-------
+
+Any problem with this release can be reported to the Tuscany mailing list
+or in the JIRA issue tracker.
+
+Mailing list subscription:
+ tuscany-dev-subscribe@ws.apache.org
+
+Jira:
+ http://issues.apache.org/jira/browse/Tuscany
+
+
+Thank you for using Tuscany!
+
+
+The Tuscany Team.
+
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/pom.xml b/branches/sca-java-integration/spec/sca-api-r0.95/pom.xml
new file mode 100644
index 0000000000..df86524cf3
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/pom.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1-integration-incubating-SNAPSHOT</version>
+ </parent>
+ <groupId>org.osoa</groupId>
+ <artifactId>sca-api-r${specVersion}</artifactId>
+ <name>SCA API Version 0.95</name>
+ <description>API classes for the Service Component Architecture</description>
+ <version>0.1-integration-incubating-SNAPSHOT</version>
+ <packaging>osgi-bundle</packaging>
+
+ <properties>
+ <specVersion>0.95</specVersion>
+ </properties>
+
+ <!-- definition of repositories where the parent pom can be found -->
+ <repositories>
+ <repository>
+ <id>apache.snapshots</id>
+ <name>Apache Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>apache.incubator</id>
+ <name>Apache Incubator Repository</name>
+ <url>http://people.apache.org/repo/m2-incubating-repository/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix.plugins</groupId>
+ <artifactId>maven-osgi-plugin</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <extensions>true</extensions>
+ <configuration>
+ <osgiManifest>
+ <bundleName>${pom.name}</bundleName>
+ <bundleDescription>${pom.description}</bundleDescription>
+ <bundleVendor>${pom.organization.name}</bundleVendor>
+ <bundleLocalization>plugin</bundleLocalization>
+ <bundleSymbolicName>org.osoa.sca</bundleSymbolicName>
+ <exportPackage>org.osoa.sca;version="${specVersion}", org.osoa.sca.annotations;version="${specVersion}"</exportPackage>
+ </osgiManifest>
+ </configuration>
+ </plugin>
+ </plugins>
+ <defaultGoal>install</defaultGoal>
+ </build>
+</project>
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/CompositeContext.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/CompositeContext.java
new file mode 100644
index 0000000000..1dbf82e9f5
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/CompositeContext.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+
+/**
+ * Interface used by SCA Components to access their context
+ *
+ * @version $Rev$ $Date$
+ */
+public interface CompositeContext {
+
+ /**
+ * Returns the name of the parent composite.
+ *
+ * @return the name of the module
+ */
+ String getName();
+
+ /**
+ * Returns the absolute URI of the composite component.
+ *
+ * @return the absolute URI of the module component
+ */
+ String getURI();
+
+ /**
+ * Returns the request context that corresponds to the last remotable service invocation. If this is
+ * invoked from outside an SCA component then <tt>null</tt> is returned.
+ *
+ * @return the current request context
+ */
+ RequestContext getRequestContext();
+
+ /**
+ * Returns an object implementing the interface defined for the named service.
+ *
+ * @param serviceName the name of another service in the current module
+ * @return an object that implements the service's interface
+ */
+ <T> T locateService(Class<T> serviceType, String serviceName);
+
+ /**
+ * Create a reference to the supplied component. The component must define only one service.
+ *
+ * @param self the component to be referenced
+ * @return a reference to the component
+ */
+ ServiceReference createServiceReferenceForSession(Object self);
+
+ /**
+ * Create a reference to the named service implemented by the supplied component.
+ *
+ * @param self the component to be referenced
+ * @param serviceName the service to be referenced
+ * @return a reference to the service
+ */
+ ServiceReference createServiceReferenceForSession(Object self, String serviceName);
+
+ /**
+ * Create a new session for stateful interaction with the named service.
+ *
+ * @param serviceName the name of the service to interact with
+ * @return a reference to the service
+ */
+ ServiceReference newSession(String serviceName);
+
+ /**
+ * Create a new session for stateful interaction with the named service using an application-supplied
+ * session identifier.
+ *
+ * @param serviceName the name of the service to interact with
+ * @param sessionId a token that identifies this session
+ * @return a reference to the service
+ */
+ ServiceReference newSession(String serviceName, Object sessionId);
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ConversationEndedException.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ConversationEndedException.java
new file mode 100644
index 0000000000..6af61c580e
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ConversationEndedException.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * Exception thrown to indicate the conversation being used for a stateful interaction has been ended.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ConversationEndedException extends ServiceRuntimeException {
+ private static final long serialVersionUID = 3734864942222558406L;
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @see ServiceRuntimeException
+ */
+ public ConversationEndedException() {
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public ConversationEndedException(String message) {
+ super(message);
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public ConversationEndedException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public ConversationEndedException(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/CurrentCompositeContext.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/CurrentCompositeContext.java
new file mode 100644
index 0000000000..a8bd851119
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/CurrentCompositeContext.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * Class providing access to the current CompositeComponent.
+ *
+ * @version $Rev$ $Date$
+ */
+public final class CurrentCompositeContext {
+ private static final ThreadLocal<CompositeContext> CURRENT_COMPONENT =
+ new InheritableThreadLocal<CompositeContext>();
+
+ /**
+ * Returns the current composite context associated with this thread.
+ *
+ * @return the current composite context
+ */
+ public static CompositeContext getContext() {
+ return CURRENT_COMPONENT.get();
+ }
+
+ /**
+ * Sets the composite context that is associated with this thread.
+ *
+ * @param context the context to associated with this thread; may be null
+ * @return the context previously associated with this thread; may be null
+ */
+ public static CompositeContext setContext(CompositeContext context) {
+ CompositeContext current = CURRENT_COMPONENT.get();
+ CURRENT_COMPONENT.set(context);
+ return current;
+ }
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java
new file mode 100644
index 0000000000..afccfd400d
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * Exception thrown to indicate that no callback has been registered
+ * when interacting with a service.
+ *
+ * @version $Rev$ $Date$
+ */
+public class NoRegisteredCallbackException extends ServiceRuntimeException {
+ private static final long serialVersionUID = 3734864942222558406L;
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @see ServiceRuntimeException
+ */
+ public NoRegisteredCallbackException() {
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public NoRegisteredCallbackException(String message) {
+ super(message);
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public NoRegisteredCallbackException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public NoRegisteredCallbackException(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/RequestContext.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/RequestContext.java
new file mode 100644
index 0000000000..9d1b09f757
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/RequestContext.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+import javax.security.auth.Subject;
+
+/**
+ * Interface that provides information on the current request.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface RequestContext {
+ /**
+ * Returns the JAAS Subject of the current request.
+ *
+ * @return the Subject of the current request
+ */
+ Subject getSecuritySubject();
+
+ /**
+ * Returns the name of the service that was invoked.
+ *
+ * @return the name of the service that was invoked
+ */
+ String getServiceName();
+
+ /**
+ * Returns a reference to the service that was invoked.
+ *
+ * @return a reference to the service that was invoked
+ */
+ ServiceReference getServiceReference();
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceReference.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceReference.java
new file mode 100644
index 0000000000..5290c1d2fb
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceReference.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+
+/**
+ * Interface that provides access to other services.
+ * Any ServiceReference can be cast to the business interface of the service to
+ * which it refers.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface ServiceReference {
+ /**
+ * Returns the session ID.
+ *
+ * @return the session ID
+ */
+ Object getSessionID();
+
+ /**
+ * End the client's session with the referenced service.
+ */
+ void endSession();
+
+ /**
+ * Returns the callback ID.
+ *
+ * @return the callback ID
+ */
+ Object getCallbackID();
+
+ /**
+ * Sets the callback ID.
+ *
+ * @param callbackID the callback ID
+ */
+ void setCallbackID(Object callbackID);
+
+ /**
+ * Returns the callback object.
+ *
+ * @return the callback object
+ */
+ Object getCallback();
+
+ /**
+ * Sets the callback object.
+ *
+ * @param callback the callback object
+ */
+ void setCallback(Object callback);
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceRuntimeException.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceRuntimeException.java
new file mode 100644
index 0000000000..460e0b720e
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceRuntimeException.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+
+/**
+ * Base for Exceptions that may be raised by an SCA runtime and which typical
+ * application code is not expected to be able to handle.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ServiceRuntimeException extends RuntimeException {
+ private static final long serialVersionUID = -3876058842262557092L;
+
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @see RuntimeException
+ */
+ public ServiceRuntimeException() {
+ }
+
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @param message passed to RuntimeException
+ * @see RuntimeException
+ */
+ public ServiceRuntimeException(String message) {
+ super(message);
+ }
+
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @param message passed to RuntimeException
+ * @param cause passed to RuntimeException
+ * @see RuntimeException
+ */
+ public ServiceRuntimeException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @param cause passed to RuntimeException
+ * @see RuntimeException
+ */
+ public ServiceRuntimeException(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceUnavailableException.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceUnavailableException.java
new file mode 100644
index 0000000000..edb0593ab2
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/ServiceUnavailableException.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * Exception used to indicate that a runtime exception occurred during the invocation of and external service.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ServiceUnavailableException extends ServiceRuntimeException {
+
+ private static final long serialVersionUID = -5869397223249401047L;
+
+ /**
+ * Constructs a new ServiceUnavailableException.
+ */
+ public ServiceUnavailableException() {
+ super((Throwable) null);
+ }
+
+ /**
+ * Constructs a new ServiceUnavailableException with the specified detail message.
+ *
+ * @param message The detail message (which is saved to later retrieval by the getMessage() method).
+ */
+ public ServiceUnavailableException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs a new ServiceUnavailableException with the specified cause.
+ *
+ * @param cause The cause (which is saved to later retrieval by the getCause() method).
+ */
+ public ServiceUnavailableException(Throwable cause) {
+ super(cause);
+ }
+
+ /**
+ * Constructs a new ServiceUnavailableException with the specified detail message and cause.
+ * @param message
+ * The message (which is saved to later retrieval by the getMessage() method).
+ * @param cause
+ * The cause (which is saved to later retrieval by the getCause() method).
+ */
+ public ServiceUnavailableException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/Version.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/Version.java
new file mode 100644
index 0000000000..0ed8f1a492
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/Version.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * Class providing information on the version of the specification
+ * supported by these API classes.
+ *
+ * @version $Rev$ $Date$
+ */
+public final class Version {
+ /**
+ * Identifier for version 1.0
+ */
+ public static final String VERSION_1_0 = "1.0";
+
+ /**
+ * Identifier for the XML Namespace for version 1.0
+ */
+ public static final String SCA_NS = "http://www.osoa.org/xmlns/sca/1.0";
+
+ /**
+ * The specification version of these API classes.
+ */
+ public static final String API_VERSION = VERSION_1_0;
+
+ private Version() {
+ }
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java
new file mode 100644
index 0000000000..dcf16126da
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation on a method that indicates that its parameters may safely
+ * be passed by reference. The annotation may also be placed on an interface
+ * or class to indicate that all declared methods support this optimization.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+public @interface AllowsPassByReference {
+}
+
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Callback.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Callback.java
new file mode 100644
index 0000000000..dbfdce7e7c
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Callback.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * When placed on a service interface, this annotation specifies the interface
+ * to be used for callbacks.
+ * <p/>
+ * When placed on a method or field, this annotation denotes the injection
+ * site to be used for a callback reference.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({TYPE, METHOD, FIELD})
+@Retention(RUNTIME)
+public @interface Callback {
+ /**
+ * The Class of the callback interface.
+ */
+ Class<?> value() default Void.class;
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ComponentName.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ComponentName.java
new file mode 100644
index 0000000000..0ad13831c2
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ComponentName.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a field or method that is used to inject the component's name.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD, FIELD})
+@Retention(RUNTIME)
+public @interface ComponentName {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Constructor.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Constructor.java
new file mode 100644
index 0000000000..8480b38926
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Constructor.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Used to indicate the constructor the runtime is to use when instantiating a component implementation instance
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(CONSTRUCTOR)
+@Retention(RUNTIME)
+public @interface Constructor {
+ String[] value() default "";
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Context.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Context.java
new file mode 100644
index 0000000000..93f6710578
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Context.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a field or method that is used to inject the component's CompositeContext.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD, FIELD})
+@Retention(RUNTIME)
+public @interface Context {
+}
+
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Conversation.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Conversation.java
new file mode 100644
index 0000000000..fe57e7a9c6
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Conversation.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate the characteristics of a conversation.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(TYPE)
+@Retention(RUNTIME)
+public @interface Conversation {
+ /**
+ * The maximum time that can pass between operations in a single conversation.
+ * If this time is exceeded the container may end the conversation.
+ */
+ public String maxIdleTime() default "";
+
+ /**
+ * The maximum time that a conversation may remain active.
+ * If this time is exceeded the container may end the conversation.
+ */
+ public String maxAge() default "";
+
+ /**
+ * If true, indicates that only the user that initiated the conversation
+ * has the authority to continue it.
+ */
+ public boolean singlePrincipal() default false;
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ConversationID.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ConversationID.java
new file mode 100644
index 0000000000..e521b91797
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/ConversationID.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a field or method that is used to inject the conversation ID.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD, FIELD})
+@Retention(RUNTIME)
+public @interface ConversationID {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Destroy.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Destroy.java
new file mode 100644
index 0000000000..0a81dbe14c
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Destroy.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a method that will be called by the container when the
+ * scope defined for the local service ends.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(METHOD)
+@Retention(RUNTIME)
+public @interface Destroy {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EagerInit.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EagerInit.java
new file mode 100644
index 0000000000..7fb9885fb4
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EagerInit.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate an instance should be eagerly initialized.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface EagerInit {
+
+ /**
+ * A Tuscany-specific extension for specifying the component's initialization order, with lesser values given
+ * precedence. A value of 0 indicates the component should not be initialized eagerly.
+ *
+ * @return the component initalization level
+ */
+ public int value() default 50;
+
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EndConversation.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EndConversation.java
new file mode 100644
index 0000000000..14f7ef865f
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/EndConversation.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a method ends a conversation.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface EndConversation {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Init.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Init.java
new file mode 100644
index 0000000000..957bec262c
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Init.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a method that will be called by the container when the scope defined for the local
+ * service begins.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(METHOD)
+@Retention(RUNTIME)
+public @interface Init {
+
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/OneWay.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/OneWay.java
new file mode 100644
index 0000000000..fbc7398da4
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/OneWay.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation on a method that indicates that the method is non-blocking and communication
+ * with the service provider may use buffer the requests and send them at some later time.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD})
+@Retention(RUNTIME)
+public @interface OneWay {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Property.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Property.java
new file mode 100644
index 0000000000..acbc35a1ec
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Property.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a constructor parameter, field or method that is
+ * used to inject a configuration property value.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target( {METHOD, FIELD, PARAMETER})
+@Retention(RUNTIME)
+public @interface Property {
+ /**
+ * The name of the property. If not specified then the name will be derived
+ * from the annotated field.
+ */
+ public String name() default "";
+
+ /**
+ * Indicates if a value must be specified.
+ */
+ public String override() default "may";
+
+ /**
+ * The XML Type in a QName format
+ */
+ public String xmlType() default "";
+
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Reference.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Reference.java
new file mode 100644
index 0000000000..7fceafadf3
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Reference.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a constructor parameter, field or method that is used to inject a reference.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD, FIELD, PARAMETER})
+@Retention(RUNTIME)
+public @interface Reference {
+ /**
+ * The name of the reference. If not specified then the name will be derived from the annotated field.
+ */
+ public String name() default "";
+
+ /**
+ * Indicates if a reference must be specified.
+ */
+ public boolean required() default false;
+}
+
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Remotable.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Remotable.java
new file mode 100644
index 0000000000..f447a4126d
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Remotable.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a Java interface as remotable.
+ * Remotable interfaces use pass-by-value semantics, can be published as entry points
+ * and used for external services.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(TYPE)
+@Retention(RUNTIME)
+public @interface Remotable {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Resource.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Resource.java
new file mode 100644
index 0000000000..b3e3855719
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Resource.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.Retention;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Annotation used to indicate a resource should be provided to an implementation by the runtime.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Resource {
+
+ /**
+ * Denotes the name of the resource declared by the implementation.
+ */
+ public String name() default "";
+
+ /**
+ * Denotes if the resource is optional
+ */
+ public boolean optional() default false;
+
+ /**
+ * Denotes the default name of the resource provided by the runtime environment.
+ */
+ public String mappedName() default "";
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Scope.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Scope.java
new file mode 100644
index 0000000000..6f952d489c
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Scope.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a scoped service.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(TYPE)
+@Retention(RUNTIME)
+public @interface Scope {
+ /**
+ * The name of the scope. Values currently defined by the specification are:
+ * <ul>
+ * <li>stateless (default)</li>
+ * <li>request</li>
+ * <li>session</li>
+ * <li>module</li>
+ * <li>conversation</li>
+ * </ul>
+ */
+ String value() default "STATELESS";
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Service.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Service.java
new file mode 100644
index 0000000000..33e7a93ea3
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/java/org/osoa/sca/annotations/Service.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate the service interfaces exposed by a Java class.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({TYPE})
+@Retention(RUNTIME)
+public @interface Service {
+ /**
+ * Array of interfaces that should be exposed as services.
+ */
+ Class<?>[] interfaces() default {};
+
+ /**
+ * Shortcut allowing a single interface to be exposed.
+ */
+ Class<?> value() default Void.class;
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-binding-sca.xsd b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-binding-sca.xsd
new file mode 100644
index 0000000000..a501639e78
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-binding-sca.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="binding.sca" type="sca:SCABinding" substitutionGroup="sca:binding"/>
+ <complexType name="SCABinding">
+ <complexContent>
+ <extension base="sca:Binding">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-binding-webservice.xsd b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-binding-webservice.xsd
new file mode 100644
index 0000000000..0ddaf95697
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-binding-webservice.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="binding.ws" type="sca:WebServiceBinding" substitutionGroup="sca:binding"/>
+ <complexType name="WebServiceBinding">
+ <complexContent>
+ <extension base="sca:Binding">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="port" type="anyURI" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-core.xsd b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-core.xsd
new file mode 100644
index 0000000000..fad0304c0d
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-core.xsd
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ elementFormDefault="qualified">
+
+ <element name="componentType" type="sca:ComponentType"/>
+ <complexType name="ComponentType">
+ <sequence>
+ <element minOccurs="0" maxOccurs="unbounded" name="service" type="sca:Service"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="reference" type="sca:Reference"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="property" type="sca:Property"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <complexType name="Service">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <element name="interface" type="sca:Interface"/>
+ <complexType name="Interface"/>
+
+ <complexType name="Reference">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="multiplicity" type="sca:Multiplicity" use="optional" default="1..1"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <complexType name="Property">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="type" type="QName" use="required"/>
+ <attribute name="many" type="boolean" default="false" use="optional"/>
+ <attribute name="required" type="boolean" default="false" use="optional"/>
+ <attribute name="default" type="string" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+
+ <element name="moduleFragment" type="sca:ModuleFragment"/>
+ <complexType name="ModuleFragment">
+ <sequence>
+ <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="component" type="sca:Component"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:ModuleWire"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <element name="module" type="sca:Module"/>
+ <complexType name="Module">
+ <complexContent>
+ <extension base="sca:ModuleFragment"/>
+ </complexContent>
+ </complexType>
+
+ <complexType name="EntryPoint">
+ <sequence>
+ <element minOccurs="0" maxOccurs="1" ref="sca:interface"/>
+ <element minOccurs="1" maxOccurs="unbounded" ref="sca:binding"/>
+ <element minOccurs="1" maxOccurs="unbounded" name="reference" type="anyURI"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="multiplicity" type="sca:Multiplicity" use="optional" default="1..1"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+ <!-- a multiplicity 1..1 or 0..n sample
+ <reference>StockQuoteComponent</reference> - type must be URI
+ a multiplicity 1..n or 0..n sample
+ <reference>StockQuoteComponent1</reference> - type must be URI
+ <reference>StockQuoteComponent2</reference>
+ -->
+
+ <element name="binding" type="sca:Binding"/>
+ <complexType name="Binding">
+ <attribute name="uri" type="anyURI" use="optional"/>
+ </complexType>
+
+ <complexType name="Component">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:implementation"/>
+ <element minOccurs="0" maxOccurs="1" name="properties" type="sca:PropertyValues"/>
+ <element minOccurs="0" maxOccurs="1" name="references" type="sca:ReferenceValues"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+ <!-- a multiplicity 1..1 or 0..1 sample
+ <references>
+ <v:stockQuote>StockQuoteComponent</v:stockquote> - type must be URI
+ </references>
+ a multiplicity 1..n or 0..n sample
+ <references>
+ <v:stockQuote>StockQuoteComponent1</v:stockQuote> - type must be URI
+ <v:stockQuote>StockQuoteComponent2</v:stockQuote>
+ </references>
+ -->
+
+ <element name="implementation" type="sca:Implementation"/>
+ <complexType name="Implementation"/>
+
+ <complexType name="PropertyValues">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <complexType name="ReferenceValues">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+
+ <complexType name="ExternalService">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
+ <element minOccurs="0" maxOccurs="unbounded" ref="sca:binding"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="overridable" type="sca:OverrideOptions" default="may" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+
+ <complexType name="ModuleWire">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:source.uri"/>
+ <element minOccurs="1" maxOccurs="1" ref="sca:target.uri"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <element name="source" type="anyType"/>
+ <element name="target" type="anyType"/>
+
+ <element name="source.uri" type="anyURI" substitutionGroup="sca:source"/>
+ <element name="target.uri" type="anyURI" substitutionGroup="sca:target"/>
+
+ <element name="subsystem" type="sca:Subsystem"/>
+ <complexType name="Subsystem">
+ <sequence>
+ <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="moduleComponent" type="sca:ModuleComponent"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:SystemWire"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="uri" type="anyURI" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <complexType name="ModuleComponent">
+ <sequence>
+ <element minOccurs="0" maxOccurs="1" name="properties" type="sca:PropertyValues"/>
+ <element minOccurs="0" maxOccurs="1" name="references" type="sca:ReferenceValues"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="module" type="NCName" use="required"/>
+ <attribute name="uri" type="anyURI" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <complexType name="SystemWire">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:source"/>
+ <element minOccurs="1" maxOccurs="1" ref="sca:target"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <element name="source.epr" type="anyType" substitutionGroup="sca:source"/>
+ <element name="target.epr" type="anyType" substitutionGroup="sca:target"/>
+
+ <simpleType name="Multiplicity">
+ <restriction base="string">
+ <enumeration value="0..1"/>
+ <enumeration value="1..1"/>
+ <enumeration value="0..n"/>
+ <enumeration value="1..n"/>
+ </restriction>
+ </simpleType>
+
+ <simpleType name="OverrideOptions">
+ <restriction base="string">
+ <enumeration value="no"/>
+ <enumeration value="may"/>
+ <enumeration value="must"/>
+ </restriction>
+ </simpleType>
+
+</schema>
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-implementation-java.xsd b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-implementation-java.xsd
new file mode 100644
index 0000000000..1395086cc5
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-implementation-java.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="implementation.java" type="sca:JavaImplementation" substitutionGroup="sca:implementation"/>
+ <complexType name="JavaImplementation">
+ <complexContent>
+ <extension base="sca:Implementation">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="class" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-interface-java.xsd b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-interface-java.xsd
new file mode 100644
index 0000000000..113176a545
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-interface-java.xsd
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="interface.java" type="sca:JavaInterface" substitutionGroup="sca:interface"/>
+ <complexType name="JavaInterface">
+ <complexContent>
+ <extension base="sca:Interface">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="interface" type="NCName" use="required"/>
+ <attribute name="callbackInterface" type="NCName" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-interface-wsdl.xsd b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-interface-wsdl.xsd
new file mode 100644
index 0000000000..5114c8db06
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca-interface-wsdl.xsd
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="interface.wsdl" type="sca:WSDLPortType" substitutionGroup="sca:interface"/>
+ <complexType name="WSDLPortType">
+ <complexContent>
+ <extension base="sca:Interface">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="interface" type="anyURI" use="required"/>
+ <attribute name="callbackInterface" type="anyURI" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca.xsd b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca.xsd
new file mode 100644
index 0000000000..62b1c265d0
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/main/resources/schemas/sca.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ -->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.osoa.org/xmlns/sca/0.9"
+ xmlns:sca="http://www.osoa.org/xmlns/sca/0.9">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <include schemaLocation="sca-interface-java.xsd"/>
+ <include schemaLocation="sca-interface-wsdl.xsd"/>
+
+ <include schemaLocation="sca-implementation-java.xsd"/>
+
+ <include schemaLocation="sca-binding-webservice.xsd"/>
+ <include schemaLocation="sca-binding-sca.xsd"/>
+
+</schema>
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/test/java/org/osoa/sca/annotations/CallbackTestCase.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/test/java/org/osoa/sca/annotations/CallbackTestCase.java
new file mode 100644
index 0000000000..c4506713f6
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/test/java/org/osoa/sca/annotations/CallbackTestCase.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+import junit.framework.TestCase;
+import org.osoa.sca.annotations.usage.CallbackType;
+
+/**
+ * Test case for callback annotation.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CallbackTestCase extends TestCase {
+ private Class<?> type;
+ private Field field;
+ private Method method;
+
+ /**
+ * Test annotation of a callback interface.
+ */
+ public void testTypeDeclaration() {
+ assertTrue(type.isAnnotationPresent(Callback.class));
+ Callback callback = type.getAnnotation(Callback.class);
+ assertEquals(Object.class, callback.value());
+ }
+
+ /**
+ * Test annotation of a private field.
+ */
+ public void testField() {
+ assertTrue(field.isAnnotationPresent(Callback.class));
+ Callback callback = field.getAnnotation(Callback.class);
+ assertEquals(Void.class, callback.value());
+ }
+
+ /**
+ * Test annotation of a method.
+ */
+ public void testMethod() {
+ assertTrue(method.isAnnotationPresent(Callback.class));
+ Callback callback = method.getAnnotation(Callback.class);
+ assertEquals(Void.class, callback.value());
+ }
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ type = CallbackType.class;
+ field = type.getDeclaredField("cbField");
+ method = type.getMethod("cbMethod");
+ }
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r0.95/src/test/java/org/osoa/sca/annotations/usage/CallbackType.java b/branches/sca-java-integration/spec/sca-api-r0.95/src/test/java/org/osoa/sca/annotations/usage/CallbackType.java
new file mode 100644
index 0000000000..962c7bef51
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r0.95/src/test/java/org/osoa/sca/annotations/usage/CallbackType.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations.usage;
+
+import org.osoa.sca.annotations.Callback;
+
+/**
+ * Mock object for callback annotation tests.
+ *
+ * @version $Rev$ $Date$
+ */
+@Callback(Object.class)
+public class CallbackType {
+ @Callback
+ private Object cbField;
+
+ /**
+ * Site for testing annotation of a public method.
+ */
+ @Callback
+ public void cbMethod() {
+ cbField = new Object();
+ }
+
+ /**
+ * Mock method to make IDEs stop complaining.
+ *
+ * @return nothing
+ */
+ public Object getCbField() {
+ return cbField;
+ }
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/LICENSE.txt b/branches/sca-java-integration/spec/sca-api-r1.0/LICENSE.txt
new file mode 100644
index 0000000000..d645695673
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/NOTICE.txt b/branches/sca-java-integration/spec/sca-api-r1.0/NOTICE.txt
new file mode 100644
index 0000000000..d83ebbe236
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/NOTICE.txt
@@ -0,0 +1,14 @@
+${pom.name}
+Copyright (c) 2005 - 2006 The Apache Software Foundation
+
+Apache Tuscany is an effort undergoing incubation at The Apache Software
+Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is
+required of all newly accepted projects until a further review indicates that
+the infrastructure, communications, and decision making process have stabilized
+in a manner consistent with other successful ASF projects. While incubation
+status is not necessarily a reflection of the completeness or stability of the
+code, it does indicate that the project has yet to be fully endorsed by the ASF.
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/pom.xml b/branches/sca-java-integration/spec/sca-api-r1.0/pom.xml
new file mode 100644
index 0000000000..7513d60814
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/pom.xml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.tuscany</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1-integration-incubating-SNAPSHOT</version>
+ </parent>
+ <groupId>org.osoa</groupId>
+ <artifactId>sca-api-r${specVersion}</artifactId>
+ <name>SCA API Version 1.0</name>
+ <description>API classes for the Service Component Architecture</description>
+ <version>0.1-integration-incubating-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <properties>
+ <specVersion>1.0</specVersion>
+ </properties>
+
+ <!-- definition of repositories where the parent pom can be found -->
+ <repositories>
+ <repository>
+ <id>apache.snapshots</id>
+ <name>Apache Snapshot Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>apache.incubator</id>
+ <name>Apache Incubator Repository</name>
+ <url>http://people.apache.org/repo/m2-incubating-repository/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ <defaultGoal>install</defaultGoal>
+ </build>
+</project>
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CallableReference.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CallableReference.java
new file mode 100644
index 0000000000..c32d229a76
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CallableReference.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * Common superclass for references that can be passed between components.
+ *
+ * @version $Rev$ $Date$
+ * @param <B> the Java interface associated with this reference
+ */
+public interface CallableReference<B> {
+ /**
+ * Returns a type-safe reference to the target of this reference.
+ * The instance returned is guaranteed to implement the business interface for this reference
+ * but may not be a proxy as defined by java.lang.reflect.Proxy.
+ *
+ * @return a proxy to the target that implements the business interface associated with this reference
+ */
+ B getService();
+
+ /**
+ * Returns the Java class for the business interface associated with this reference.
+ *
+ * @return the Class for the business interface associated with this reference
+ */
+ Class<B> getBusinessInterface();
+
+ /**
+ * Returns true if this reference is conversational.
+ *
+ * @return true if this reference is conversational
+ */
+ boolean isConversational();
+
+ /**
+ * Returns the conversation associated with this reference.
+ * Returns null if no conversation is currently active.
+ *
+ * @return the conversation associated with this reference; may be null
+ */
+ Conversation getConversation();
+
+ /**
+ * Returns the callback ID.
+ *
+ * @return the callback ID
+ */
+ Object getCallbackID();
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ComponentContext.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ComponentContext.java
new file mode 100644
index 0000000000..616d4c6338
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ComponentContext.java
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * Interface providing programmatic access to a component's SCA context as an alternative to injection.
+ * It provides access to reference and property values for the component and provides a mechanism for
+ * obtaining a reference to a service that can be passed to other components.
+ * <p/>
+ * SCA components obtain an instance of this interface through injection. Non-SCA client code may also
+ * obtain an instance through runtime-specific mechanisms.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface ComponentContext {
+ /**
+ * Returns the absolute URI of the component within the SCA Domain.
+ *
+ * @return the absolute URI of the component
+ */
+ String getURI();
+
+ /**
+ * Cast a type-safe reference to a CallableReference.
+ * Converts a type-safe reference to an equivalent CallableReference; if the target refers to a service
+ * then a ServiceReference will be returned, if the target refers to a callback then a CallableReference
+ * will be returned.
+ *
+ * @param target a reference proxy provided by the SCA runtime
+ * @param <B> the Java type of the business interface for the reference
+ * @param <R> the type of reference to be returned
+ * @return a CallableReference equivalent for the proxy
+ * @throws IllegalArgumentException if the supplied instance is not a reference supplied by the SCA runtime
+ */
+ <B, R extends CallableReference<B>> R cast(B target) throws IllegalArgumentException;
+
+ /**
+ * Returns a proxy for a reference defined by this component.
+ *
+ * @param businessInterface the interface that will be used to invoke the service
+ * @param referenceName the name of the reference
+ * @param <B> the Java type of the business interface for the reference
+ * @return an object that implements the business interface
+ */
+ <B> B getService(Class<B> businessInterface, String referenceName);
+
+ /**
+ * Returns a ServiceReference for a reference defined by this component.
+ *
+ * @param businessInterface the interface that will be used to invoke the service
+ * @param referenceName the name of the reference
+ * @param <B> the Java type of the business interface for the reference
+ * @return a ServiceReference for the designated reference
+ */
+ <B> ServiceReference<B> getServiceReference(Class<B> businessInterface, String referenceName);
+
+ /**
+ * Returns the value of an SCA property defined by this component.
+ *
+ * @param type the Java type to be returned for the property
+ * @param propertyName the name of the property whose value should be returned
+ * @param <B> the Java type of the property
+ * @return the property value
+ */
+ <B> B getProperty(Class<B> type, String propertyName);
+
+ /**
+ * Returns a ServiceReference that can be used to invoke this component over the default service.
+ *
+ * @param businessInterface the interface that will be used to invoke the service
+ * @param <B> the Java type of the business interface for the reference
+ * @return a ServiceReference that will invoke this component
+ */
+ <B> ServiceReference<B> createSelfReference(Class<B> businessInterface);
+
+ /**
+ * Returns a ServiceReference that can be used to invoke this component over the designated service.
+ *
+ * @param businessInterface the interface that will be used to invoke the service
+ * @param serviceName the name of the service to invoke
+ * @param <B> the Java type of the business interface for the reference
+ * @return a ServiceReference that will invoke this component
+ */
+ <B> ServiceReference<B> createSelfReference(Class<B> businessInterface, String serviceName);
+
+ /**
+ * Returns the context for the current SCA service request, or null if there is no current request
+ * or if the context is unavailable.
+ *
+ * @return the SCA request context; may be null
+ */
+ RequestContext getRequestContext();
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CompositeContext.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CompositeContext.java
new file mode 100644
index 0000000000..fcca132e0e
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CompositeContext.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+
+/**
+ * @deprecated
+ *
+ * Interface used by SCA Components to access their context
+ *
+ * @version $Rev$ $Date$
+ */
+public interface CompositeContext {
+
+ /**
+ * Returns the name of the parent composite.
+ *
+ * @return the name of the module
+ */
+ String getName();
+
+ /**
+ * Returns the absolute URI of the composite component.
+ *
+ * @return the absolute URI of the module component
+ */
+ String getURI();
+
+ /**
+ * Returns the request context that corresponds to the last remotable service invocation. If this is
+ * invoked from outside an SCA component then <tt>null</tt> is returned.
+ *
+ * @return the current request context
+ */
+ RequestContext getRequestContext();
+
+ /**
+ * Returns an object implementing the interface defined for the named service.
+ *
+ * @param serviceName the name of another service in the current module
+ * @return an object that implements the service's interface
+ */
+ <T> T locateService(Class<T> serviceType, String serviceName);
+
+ /**
+ * Create a reference to the supplied component. The component must define only one service.
+ *
+ * @param self the component to be referenced
+ * @return a reference to the component
+ */
+ ServiceReference createServiceReferenceForSession(Object self);
+
+ /**
+ * Create a reference to the named service implemented by the supplied component.
+ *
+ * @param self the component to be referenced
+ * @param serviceName the service to be referenced
+ * @return a reference to the service
+ */
+ ServiceReference createServiceReferenceForSession(Object self, String serviceName);
+
+ /**
+ * Create a new session for stateful interaction with the named service.
+ *
+ * @param serviceName the name of the service to interact with
+ * @return a reference to the service
+ */
+ ServiceReference newSession(String serviceName);
+
+ /**
+ * Create a new session for stateful interaction with the named service using an application-supplied
+ * session identifier.
+ *
+ * @param serviceName the name of the service to interact with
+ * @param sessionId a token that identifies this session
+ * @return a reference to the service
+ */
+ ServiceReference newSession(String serviceName, Object sessionId);
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/Constants.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/Constants.java
new file mode 100644
index 0000000000..b1b2af8048
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/Constants.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface Constants {
+ /**
+ * Namespace for intents.
+ */
+ String SCA_NS = "http://www.osoa.org/xmlns/sca/1.0";
+
+ /**
+ * Prefix form of the namespace that can be prepended to intent declarations.
+ */
+ String SCA_PREFIX = '{' + SCA_NS + '}';
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/Conversation.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/Conversation.java
new file mode 100644
index 0000000000..64423a4aa2
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/Conversation.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * Interface representing a Conversation providing access to the conversation id and and a mechanism
+ * to terminate the conversation.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface Conversation {
+ /**
+ * Returns the identifier for this conversation.
+ * If a user-defined identity had been supplied for this reference then its value will be returned;
+ * otherwise the identity generated by the system when the conversation was initiated will be returned.
+ *
+ * @return the identifier for this conversation
+ */
+ Object getConversationID();
+
+ /**
+ * End this conversation.
+ */
+ void end();
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ConversationEndedException.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ConversationEndedException.java
new file mode 100644
index 0000000000..63e3907cff
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ConversationEndedException.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * Exception thrown to indicate the conversation being used for a stateful interaction has been ended.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ConversationEndedException extends ServiceRuntimeException {
+ private static final long serialVersionUID = 3734864942222558406L;
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @see ServiceRuntimeException
+ */
+ public ConversationEndedException() {
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public ConversationEndedException(String message) {
+ super(message);
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public ConversationEndedException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public ConversationEndedException(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CurrentCompositeContext.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CurrentCompositeContext.java
new file mode 100644
index 0000000000..0ed4cf8b96
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/CurrentCompositeContext.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * @deprecated
+ *
+ * Class providing access to the current CompositeComponent.
+ *
+ * @version $Rev$ $Date$
+ */
+public final class CurrentCompositeContext {
+ private static final ThreadLocal<CompositeContext> CURRENT_COMPONENT =
+ new InheritableThreadLocal<CompositeContext>();
+
+ /**
+ * Returns the current composite context associated with this thread.
+ *
+ * @return the current composite context
+ */
+ public static CompositeContext getContext() {
+ return CURRENT_COMPONENT.get();
+ }
+
+ /**
+ * Sets the composite context that is associated with this thread.
+ *
+ * @param context the context to associated with this thread; may be null
+ * @return the context previously associated with this thread; may be null
+ */
+ public static CompositeContext setContext(CompositeContext context) {
+ CompositeContext current = CURRENT_COMPONENT.get();
+ CURRENT_COMPONENT.set(context);
+ return current;
+ }
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java
new file mode 100644
index 0000000000..7c067a3a43
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/NoRegisteredCallbackException.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * Exception thrown to indicate that no callback has been registered
+ * when interacting with a service.
+ *
+ * @version $Rev$ $Date$
+ */
+public class NoRegisteredCallbackException extends ServiceRuntimeException {
+ private static final long serialVersionUID = 3734864942222558406L;
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @see ServiceRuntimeException
+ */
+ public NoRegisteredCallbackException() {
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public NoRegisteredCallbackException(String message) {
+ super(message);
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param message passed to ServiceRuntimeException
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public NoRegisteredCallbackException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Override constructor from ServiceRuntimeException.
+ *
+ * @param cause passed to ServiceRuntimeException
+ * @see ServiceRuntimeException
+ */
+ public NoRegisteredCallbackException(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/RequestContext.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/RequestContext.java
new file mode 100644
index 0000000000..900d5eecc1
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/RequestContext.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+import javax.security.auth.Subject;
+
+/**
+ * Interface that provides information on the current request.
+ *
+ * @version $Rev$ $Date$
+ */
+public interface RequestContext {
+ /**
+ * Returns the JAAS Subject of the current request.
+ *
+ * @return the Subject of the current request
+ */
+ Subject getSecuritySubject();
+
+ /**
+ * Returns the name of the service that was invoked.
+ *
+ * @return the name of the service that was invoked
+ */
+ String getServiceName();
+
+ /**
+ * Returns a CallableReference for the service that was invoked by the caller.
+ *
+ * @param <B> the Java type of the business interface for the reference
+ * @return a CallableReference for the service that was invoked by the caller
+ */
+ <B> CallableReference<B> getServiceReference();
+
+ /**
+ * Returns a type-safe reference to the callback provided by the caller.
+ *
+ * @param <CB> the Java type of the business interface for the callback
+ * @return a type-safe reference to the callback provided by the caller
+ */
+ <CB> CB getCallback();
+
+ /**
+ * Returns a CallableReference to the callback provided by the caller.
+ *
+ * @param <CB> the Java type of the business interface for the callback
+ * @return a CallableReference to the callback provided by the caller
+ */
+ <CB> CallableReference<CB> getCallbackReference();
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceReference.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceReference.java
new file mode 100644
index 0000000000..8790aac4fb
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceReference.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+
+/**
+ * A ServiceReference represents a client's perspective of a reference to another service.
+ *
+ * @version $Rev$ $Date$
+ * @param <B> the Java interface associated with this reference
+ */
+public interface ServiceReference<B> extends CallableReference<B> {
+ /**
+ * Returns the id supplied by the user that will be associated with conversations initiated through this reference.
+ *
+ * @return the id to associated with any conversation initiated through this reference
+ */
+ Object getConversationID();
+
+ /**
+ * Set the id to associate with any conversation started through this reference.
+ * If the value supplied is null then the id will be generated by the implementation.
+ *
+ * @param conversationId the user-defined id to associated with a conversation
+ * @throws IllegalStateException if a conversation is currently associated with this reference
+ */
+ void setConversationID(Object conversationId) throws IllegalStateException;
+
+ /**
+ * Sets the callback ID.
+ *
+ * @param callbackID the callback ID
+ */
+ void setCallbackID(Object callbackID);
+
+ /**
+ * Returns the callback object.
+ *
+ * @return the callback object
+ */
+ Object getCallback();
+
+ /**
+ * Sets the callback object.
+ *
+ * @param callback the callback object
+ */
+ void setCallback(Object callback);
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceRuntimeException.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceRuntimeException.java
new file mode 100644
index 0000000000..1c6b436afa
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceRuntimeException.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+
+/**
+ * Base for Exceptions that may be raised by an SCA runtime and which typical
+ * application code is not expected to be able to handle.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ServiceRuntimeException extends RuntimeException {
+ private static final long serialVersionUID = -3876058842262557092L;
+
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @see RuntimeException
+ */
+ public ServiceRuntimeException() {
+ }
+
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @param message passed to RuntimeException
+ * @see RuntimeException
+ */
+ public ServiceRuntimeException(String message) {
+ super(message);
+ }
+
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @param message passed to RuntimeException
+ * @param cause passed to RuntimeException
+ * @see RuntimeException
+ */
+ public ServiceRuntimeException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ /**
+ * Override constructor from RuntimeException.
+ *
+ * @param cause passed to RuntimeException
+ * @see RuntimeException
+ */
+ public ServiceRuntimeException(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceUnavailableException.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceUnavailableException.java
new file mode 100644
index 0000000000..d3543799ed
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/ServiceUnavailableException.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca;
+
+/**
+ * Exception used to indicate that a runtime exception occurred during the invocation of and external service.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ServiceUnavailableException extends ServiceRuntimeException {
+
+ private static final long serialVersionUID = -5869397223249401047L;
+
+ /**
+ * Constructs a new ServiceUnavailableException.
+ */
+ public ServiceUnavailableException() {
+ super((Throwable) null);
+ }
+
+ /**
+ * Constructs a new ServiceUnavailableException with the specified detail message.
+ *
+ * @param message The detail message (which is saved to later retrieval by the getMessage() method).
+ */
+ public ServiceUnavailableException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs a new ServiceUnavailableException with the specified cause.
+ *
+ * @param cause The cause (which is saved to later retrieval by the getCause() method).
+ */
+ public ServiceUnavailableException(Throwable cause) {
+ super(cause);
+ }
+
+ /**
+ * Constructs a new ServiceUnavailableException with the specified detail message and cause.
+ *
+ * @param message The message (which is saved to later retrieval by the getMessage() method).
+ * @param cause The cause (which is saved to later retrieval by the getCause() method).
+ */
+ public ServiceUnavailableException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java
new file mode 100644
index 0000000000..dcf16126da
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/AllowsPassByReference.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation on a method that indicates that its parameters may safely
+ * be passed by reference. The annotation may also be placed on an interface
+ * or class to indicate that all declared methods support this optimization.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({TYPE, METHOD})
+@Retention(RUNTIME)
+public @interface AllowsPassByReference {
+}
+
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Authentication.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Authentication.java
new file mode 100644
index 0000000000..290ec05b7f
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Authentication.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+import static org.osoa.sca.Constants.SCA_PREFIX;
+
+/**
+ * Annotation denoting the intent that service operations require authentication.
+ * <p/>
+ * Applied to the injection site (field, method or constructor parameter) for a reference,
+ * it indicates that all invocations through that reference require authentication.
+ * <p/>
+ * Applied to a interface method on a service contract, it indicates that all invocations
+ * of that service operation require authentication; applied to the type of a service contract,
+ * it indicates that all service operations on that interface require authentication.
+ * <p/>
+ * Applied to a method on an implementation class, it indicates that all invocations that
+ * are dispatched to that implementation method (through any service) require authentication.
+ * Applied to a interface implemented by an implementation class, it indicates that all
+ * invocations that are dispatched to the implementation method for that interface operation
+ * require authentication.
+ * <p/>
+ * Applied to an implementation class, it indicates that all invocations of that implementation
+ * and that all invocations made by that implementation require authentication.
+ *
+ * @version $Rev$ $Date$
+ */
+@Inherited
+@Target({TYPE, FIELD, METHOD, PARAMETER})
+@Retention(RUNTIME)
+@Intent(Authentication.AUTHENTICATION)
+public @interface Authentication {
+ String AUTHENTICATION = SCA_PREFIX + "authentication";
+ String AUTHENTICATION_MESSAGE = AUTHENTICATION + "message";
+ String AUTHENTICATION_TRANSPORT = AUTHENTICATION + "transport";
+
+ /**
+ * List of authentication qualifiers (such as "message" or "transport").
+ *
+ * @return authentication qualifiers
+ */
+ @Qualifier
+ String[] value() default "";
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Callback.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Callback.java
new file mode 100644
index 0000000000..6b3e51211a
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Callback.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * When placed on a service interface, this annotation specifies the interface
+ * to be used for callbacks.
+ * <p/>
+ * When placed on a method or field, this annotation denotes the injection
+ * site to be used for a callback reference.
+ * <p/>
+ * There is a error in the 1.00 draft spec in the declaration of this interface.
+ * The form defined here is a proposed correction for that error.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({TYPE, METHOD, FIELD})
+@Retention(RUNTIME)
+public @interface Callback {
+ /**
+ * The Class of the associated callback interface.
+ *
+ * @return the associated callback interface
+ */
+ Class<?> value() default Void.class;
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ComponentName.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ComponentName.java
new file mode 100644
index 0000000000..0ad13831c2
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ComponentName.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a field or method that is used to inject the component's name.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD, FIELD})
+@Retention(RUNTIME)
+public @interface ComponentName {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Confidentiality.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Confidentiality.java
new file mode 100644
index 0000000000..e8b0721ce5
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Confidentiality.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+import static org.osoa.sca.Constants.SCA_PREFIX;
+
+/**
+ * Annotation denoting the intent that service operations require confidentiality.
+ * <p/>
+ * Applied to the injection site (field, method or constructor parameter) for a reference,
+ * it indicates that all invocations through that reference require confidentiality.
+ * <p/>
+ * Applied to a interface method on a service contract, it indicates that all invocations
+ * of that service operation require confidentiality; applied to the type of a service contract,
+ * it indicates that all service operations on that interface require confidentiality.
+ * <p/>
+ * Applied to a method on an implementation class, it indicates that all invocations that
+ * are dispatched to that implementation method (through any service) require confidentiality.
+ * Applied to a interface implemented by an implementation class, it indicates that all
+ * invocations that are dispatched to the implementation method for that interface operation
+ * require confidentiality.
+ * <p/>
+ * Applied to an implementation class, it indicates that all invocations of that implementation
+ * and that all invocations made by that implementation require confidentiality.
+ *
+ * @version $Rev$ $Date$
+ */
+@Inherited
+@Target({TYPE, FIELD, METHOD, PARAMETER})
+@Retention(RUNTIME)
+@Intent(Confidentiality.CONFIDENTIALITY)
+public @interface Confidentiality {
+ String CONFIDENTIALITY = SCA_PREFIX + "confidentiality";
+ String CONFIDENTIALITY_MESSAGE = CONFIDENTIALITY + ".message";
+ String CONFIDENTIALITY_TRANSPORT = CONFIDENTIALITY + ".transport";
+
+ /**
+ * List of confidentiality qualifiers (such as "message" or "transport").
+ *
+ * @return confidentiality qualifiers
+ */
+ @Qualifier
+ String[] value() default "";
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Constructor.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Constructor.java
new file mode 100644
index 0000000000..8480b38926
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Constructor.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Used to indicate the constructor the runtime is to use when instantiating a component implementation instance
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(CONSTRUCTOR)
+@Retention(RUNTIME)
+public @interface Constructor {
+ String[] value() default "";
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Context.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Context.java
new file mode 100644
index 0000000000..c02e220d3c
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Context.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a field or setter method that is used to inject an SCA context.
+ * The type of context injected is determined by the type of the field or the parameter
+ * to the setter method and is typically a ComponentContext or RequestContext.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD, FIELD})
+@Retention(RUNTIME)
+public @interface Context {
+}
+
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ConversationAttributes.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ConversationAttributes.java
new file mode 100644
index 0000000000..edd2307de8
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ConversationAttributes.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate the characteristics of a conversation.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(ElementType.TYPE)
+@Retention(RUNTIME)
+public @interface ConversationAttributes {
+ /**
+ * The maximum time that can pass between operations in a single conversation. If this time is exceeded the
+ * container may end the conversation.
+ *
+ * @return the maximum time that can pass between operations in a single conversation
+ */
+ public String maxIdleTime() default "";
+
+ /**
+ * The maximum time that a conversation may remain active. If this time is exceeded the container may end the
+ * conversation.
+ *
+ * @return the maximum time that a conversation may remain active
+ */
+ public String maxAge() default "";
+
+ /**
+ * If true, indicates that only the user that initiated the conversation has the authority to continue it.
+ *
+ * @return true if only the user that initiated the conversation has the authority to continue it
+ */
+ public boolean singlePrincipal() default false;
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ConversationID.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ConversationID.java
new file mode 100644
index 0000000000..e521b91797
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/ConversationID.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a field or method that is used to inject the conversation ID.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD, FIELD})
+@Retention(RUNTIME)
+public @interface ConversationID {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Conversational.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Conversational.java
new file mode 100644
index 0000000000..c2e6e7fe0f
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Conversational.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Used on a Java interface to denote a conversational service contract.
+ * <p/>
+ * The draft spec erroneously defines the targets for this as {TYPE, METHOD, FIELD}
+ * but this annotation is only applicable to interfaces.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({TYPE})
+@Retention(RUNTIME)
+public @interface Conversational {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Destroy.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Destroy.java
new file mode 100644
index 0000000000..0a81dbe14c
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Destroy.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a method that will be called by the container when the
+ * scope defined for the local service ends.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(METHOD)
+@Retention(RUNTIME)
+public @interface Destroy {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/EagerInit.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/EagerInit.java
new file mode 100644
index 0000000000..5a2fdd7518
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/EagerInit.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate an instance should be eagerly initialized.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({TYPE})
+@Retention(RUNTIME)
+public @interface EagerInit {
+
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/EndsConversation.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/EndsConversation.java
new file mode 100644
index 0000000000..021900752c
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/EndsConversation.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a method ends a conversation.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD})
+@Retention(RUNTIME)
+public @interface EndsConversation {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Init.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Init.java
new file mode 100644
index 0000000000..957bec262c
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Init.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a method that will be called by the container when the scope defined for the local
+ * service begins.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(METHOD)
+@Retention(RUNTIME)
+public @interface Init {
+
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Integrity.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Integrity.java
new file mode 100644
index 0000000000..11f266ac5e
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Integrity.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+import static org.osoa.sca.Constants.SCA_PREFIX;
+
+/**
+ * Annotation denoting the intent that service operations require integrity.
+ * <p/>
+ * Applied to the injection site (field, method or constructor parameter) for a reference,
+ * it indicates that all invocations through that reference require integrity.
+ * <p/>
+ * Applied to a interface method on a service contract, it indicates that all invocations
+ * of that service operation require integrity; applied to the type of a service contract,
+ * it indicates that all service operations on that interface require integrity.
+ * <p/>
+ * Applied to a method on an implementation class, it indicates that all invocations that
+ * are dispatched to that implementation method (through any service) require integrity.
+ * Applied to a interface implemented by an implementation class, it indicates that all
+ * invocations that are dispatched to the implementation method for that interface operation
+ * require integrity.
+ * <p/>
+ * Applied to an implementation class, it indicates that all invocations of that implementation
+ * and that all invocations made by that implementation require integrity.
+ *
+ * @version $Rev$ $Date$
+ */
+@Inherited
+@Target({TYPE, FIELD, METHOD, PARAMETER})
+@Retention(RUNTIME)
+@Intent(Integrity.INTEGRITY)
+public @interface Integrity {
+ String INTEGRITY = SCA_PREFIX + "integrity";
+ String INTEGRITY_MESSAGE = INTEGRITY + "message";
+ String INTEGRITY_TRANSPORT = INTEGRITY + "transport";
+
+ /**
+ * List of integrity qualifiers (such as "message" or "transport").
+ *
+ * @return integrity qualifiers
+ */
+ @Qualifier
+ String[] value() default "";
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Intent.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Intent.java
new file mode 100644
index 0000000000..c655495e74
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Intent.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation that can be applied to annotations that describe SCA intents.
+ * Adding this annotation allows SCA runtimes to automatically detect user-defined intents.
+ * <p/>
+ * Applications must specify a value, a pairing of targetNamespace and localPort, or both.
+ * If both value and pairing are supplied they must define the name qualified name.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({ANNOTATION_TYPE})
+@Retention(RUNTIME)
+public @interface Intent {
+ /**
+ * The qualified name of the intent, in the form defined by {@link javax.xml.namespace.QName#toString}.
+ *
+ * @return the qualified name of the intent
+ */
+ String value() default "";
+
+ /**
+ * The XML namespace for the intent.
+ *
+ * @return the XML namespace for the intent
+ */
+ String targetNamespace() default "";
+
+ /**
+ * The name of the intent within its namespace.
+ *
+ * @return name of the intent within its namespace
+ */
+ String localPart() default "";
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/OneWay.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/OneWay.java
new file mode 100644
index 0000000000..37fbaf96cd
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/OneWay.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation on a method that indicates that the method is non-blocking and communication
+ * with the service provider may use buffer the requests and send them at some later time.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD})
+@Retention(RUNTIME)
+public @interface OneWay {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/PolicySets.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/PolicySets.java
new file mode 100644
index 0000000000..5bf43b0539
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/PolicySets.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation that allows application of SCA Policy Sets.
+ * <p/>
+ * Each policy set is specified using its XML QName in the form defined by {@link javax.xml.namespace.QName#toString()}.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({TYPE, FIELD, METHOD, PARAMETER})
+@Retention(RUNTIME)
+public @interface PolicySets {
+ /**
+ * Returns the policy sets to be applied.
+ *
+ * @return the policy sets to be applied
+ */
+ String[] value() default "";
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Property.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Property.java
new file mode 100644
index 0000000000..e0248c01f9
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Property.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a constructor parameter, field or method that is
+ * used to inject a configuration property value.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD, FIELD, PARAMETER})
+@Retention(RUNTIME)
+public @interface Property {
+ /**
+ * The name of the property. If not specified then the name will be derived
+ * from the annotated field or method.
+ *
+ * @return the name of the property
+ */
+ String name() default "";
+
+ /**
+ * Indicates whether a value for the property must be provided.
+ *
+ * @return true if a value must be provided
+ */
+ boolean required() default false;
+
+ /**
+ * The XML Type in a QName format
+ */
+ String xmlType() default "";
+ }
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Qualifier.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Qualifier.java
new file mode 100644
index 0000000000..9875891460
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Qualifier.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation that can be applied to an attribute of an @Intent annotation to indicate the
+ * attribute provides qualifiers for the intent.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(METHOD)
+@Retention(RUNTIME)
+public @interface Qualifier {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Reference.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Reference.java
new file mode 100644
index 0000000000..f6f6797ccc
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Reference.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a constructor parameter, field or method that is used to inject a reference.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({METHOD, FIELD, PARAMETER})
+@Retention(RUNTIME)
+public @interface Reference {
+ /**
+ * The name of the reference. If not specified then the name will be derived from the annotated field or method.
+ *
+ * @return the name of the reference
+ */
+ public String name() default "";
+
+ /**
+ * Indicates if a reference must be specified.
+ *
+ * @return true if a reference must be specified
+ */
+ public boolean required() default false;
+}
+
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Remotable.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Remotable.java
new file mode 100644
index 0000000000..f447a4126d
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Remotable.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a Java interface as remotable.
+ * Remotable interfaces use pass-by-value semantics, can be published as entry points
+ * and used for external services.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(TYPE)
+@Retention(RUNTIME)
+public @interface Remotable {
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Requires.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Requires.java
new file mode 100644
index 0000000000..2f14ab59f6
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Requires.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation that allows the attachment of any intent to a Java Class or interface or to members of that
+ * class such as methods, fields or constructor parameters.
+ * <p/>
+ * Intents are specified as XML QNames in the representation defined by
+ * {@link javax.xml.namespace.QName#toString()}. Intents may be qualified with one or more
+ * suffixes separated by a "." such as:
+ * <ul>
+ * <li>{http://www.osoa.org/xmlns/sca/1.0}confidentiality</li>
+ * <li>{http://www.osoa.org/xmlns/sca/1.0}confidentiality.message</li>
+ * </ul>
+ * This annotation supports general purpose intents specified as strings. Users may also define
+ * specific intents using the {@link @org.osoa.sca.annotations.Intent} annotation.
+ *
+ * @version $Rev$ $Date$
+ */
+@Inherited
+@Retention(RUNTIME)
+@Target({TYPE, METHOD, FIELD, PARAMETER})
+public @interface Requires {
+ /**
+ * Returns the attached intents.
+ *
+ * @return the attached intents
+ */
+ String[] value() default "";
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Scope.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Scope.java
new file mode 100644
index 0000000000..9f82fbc283
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Scope.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate a scoped service.
+ * <p/>
+ * The spec refers to but does not describe an eager() attribute; this is an error in the draft.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target(TYPE)
+@Retention(RUNTIME)
+public @interface Scope {
+ /**
+ * The name of the scope. Values currently defined by the specification are:
+ * <ul>
+ * <li>STATELESS (default)</li>
+ * <li>REQUEST</li>
+ * <li>CONVERSATION</li>
+ * <li>COMPOSITE</li>
+ * </ul>
+ *
+ * @return the name of the scope
+ */
+ String value() default "STATELESS";
+}
diff --git a/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Service.java b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Service.java
new file mode 100644
index 0000000000..99d3dbfebe
--- /dev/null
+++ b/branches/sca-java-integration/spec/sca-api-r1.0/src/main/java/org/osoa/sca/annotations/Service.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.osoa.sca.annotations;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Annotation used to indicate the service interfaces exposed by a Java class.
+ *
+ * @version $Rev$ $Date$
+ */
+@Target({TYPE})
+@Retention(RUNTIME)
+public @interface Service {
+ /**
+ * Array of interfaces that should be exposed as services.
+ *
+ * @return a list of interfaces that should be exposed as services
+ */
+ Class<?>[] interfaces() default {};
+
+ /**
+ * Shortcut allowing a single interface to be exposed.
+ *
+ * @return a single service interfaces to be exposed
+ */
+ Class<?> value() default Void.class;
+}