You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ad...@apache.org on 2008/03/21 04:42:46 UTC

svn commit: r639535 [1/7] - in /incubator/tuscany/sandbox/mobile-android: core-android/ core-android/src/ core-android/src/main/ core-android/src/main/java/ core-android/src/main/java/org/ core-android/src/main/java/org/apache/ core-android/src/main/ja...

Author: adrianocrestani
Date: Thu Mar 20 20:42:35 2008
New Revision: 639535

URL: http://svn.apache.org/viewvc?rev=639535&view=rev
Log:
-some dynamic instantiations are now being done statically on host-android module
-added the core-android module, which is a copy of core module, where its Jsr237WorkScheduler class constructor needed to be modified

Added:
    incubator/tuscany/sandbox/mobile-android/core-android/
    incubator/tuscany/sandbox/mobile-android/core-android/DISCLAIMER
    incubator/tuscany/sandbox/mobile-android/core-android/LICENSE
    incubator/tuscany/sandbox/mobile-android/core-android/NOTICE
    incubator/tuscany/sandbox/mobile-android/core-android/src/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/ActivationException.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivator.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivatorImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/EndpointReferenceImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/ReferenceParameterProcessor.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/ReferenceParametersImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeAssemblyFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeComponentImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeComponentReferenceImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeComponentServiceImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/context/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/context/CallableReferenceImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/context/ComponentContextHelper.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/context/ComponentContextImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/context/DefaultComponentContextFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/context/InstanceWrapper.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/context/RequestContextImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/context/ServiceReferenceImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/conversation/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/conversation/ConversationListener.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/conversation/ConversationManager.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/conversation/ConversationManagerImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/conversation/ConversationState.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/conversation/ExtendedConversation.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/conversation/ExtendedConversationImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/BaseEventPublisher.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ComponentStart.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ComponentStop.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ConversationEnd.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/ConversationStart.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionEnd.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/HttpSessionStart.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/RequestEnd.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/event/RequestStart.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/factory/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/factory/ObjectCreationException.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/factory/ObjectFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/CallableReferenceObjectFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/CallbackInterfaceInterceptor.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/CallbackReferenceImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/CallbackReferenceObjectFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/CallbackWireObjectFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/CglibProxyFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/DefaultProxyFactoryExtensionPoint.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/ExtensibleWireProcessor.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/InvocationChainImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/JDKCallbackInvocationHandler.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/JDKProxyFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/MessageFactoryImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/MessageImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/NoMethodForOperationException.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/NonBlockingInterceptor.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/PhaseManager.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/PhaseSorter.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/ProxyCreationException.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/ProxyFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/ProxyFactoryExtensionPoint.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeWireInvoker.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/TargetInvocationException.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/ThreadMessageContext.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/invocation/WireObjectFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/AbstractScopeContainer.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/CompositeScopeContainer.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/CompositeScopeContainerFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/ConversationalScopeContainer.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/ConversationalScopeContainerFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/HttpSessionScopeContainer.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/HttpSessionScopeContainerFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/RequestScopeContainer.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/RequestScopeContainerFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/Scope.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/ScopeContainer.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/ScopeContainerFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/ScopeRegistry.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/ScopeRegistryImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/ScopedImplementationProvider.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/ScopedRuntimeComponent.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/StatelessScopeContainer.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/StatelessScopeContainerFactory.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/TargetDestructionException.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/TargetInitializationException.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/TargetNotFoundException.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/scope/TargetResolutionException.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/store/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/store/MemoryStore.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/work/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/work/Jsr237Work.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/work/Jsr237WorkScheduler.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/work/ThreadPoolWorkManager.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/work/WorkEventImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/work/WorkItemImpl.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/resources/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/resources/META-INF/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/resources/META-INF/services/
    incubator/tuscany/sandbox/mobile-android/core-android/src/main/resources/META-INF/services/org.apache.tuscany.sca.work.WorkScheduler
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistryTestCase.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/event/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/event/BaseEventPublisherTestCase.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/event/EventTestCase.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/invocation/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/invocation/PhaseManagerTestCase.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/invocation/PhaseSorterTestCase.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/scope/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/scope/AbstractScopeContainerTestCase.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/store/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/store/MemoryStoreTestCase.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/wire/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/wire/CallbackInterfaceInterceptorTestCase.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/wire/InvocationChainImplTestCase.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/core/wire/NonBlockingInterceptorTestCase.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/scope/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/java/org/apache/tuscany/sca/scope/ScopeTestCase.java
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/resources/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/resources/META-INF/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/resources/META-INF/services/
    incubator/tuscany/sandbox/mobile-android/core-android/src/test/resources/META-INF/services/org.apache.tuscany.sca.invocation.PhaseTest
Modified:
    incubator/tuscany/sandbox/mobile-android/host-android/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java
    incubator/tuscany/sandbox/mobile-android/host-android/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java
    incubator/tuscany/sandbox/mobile-android/host-android/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java

Added: incubator/tuscany/sandbox/mobile-android/core-android/DISCLAIMER
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/core-android/DISCLAIMER?rev=639535&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/core-android/DISCLAIMER (added)
+++ incubator/tuscany/sandbox/mobile-android/core-android/DISCLAIMER Thu Mar 20 20:42:35 2008
@@ -0,0 +1,8 @@
+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.
+

Added: incubator/tuscany/sandbox/mobile-android/core-android/LICENSE
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/core-android/LICENSE?rev=639535&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/core-android/LICENSE (added)
+++ incubator/tuscany/sandbox/mobile-android/core-android/LICENSE Thu Mar 20 20:42:35 2008
@@ -0,0 +1,205 @@
+
+                                 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.
+
+
+

Added: incubator/tuscany/sandbox/mobile-android/core-android/NOTICE
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/core-android/NOTICE?rev=639535&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/core-android/NOTICE (added)
+++ incubator/tuscany/sandbox/mobile-android/core-android/NOTICE Thu Mar 20 20:42:35 2008
@@ -0,0 +1,6 @@
+${pom.name}
+Copyright (c) 2005 - 2008 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+

Added: incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/ActivationException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/ActivationException.java?rev=639535&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/ActivationException.java (added)
+++ incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/ActivationException.java Thu Mar 20 20:42:35 2008
@@ -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.apache.tuscany.sca.core.assembly;
+
+
+/**
+ * Denotes an error starting the runtime
+ *
+ * @version $Rev: 568826 $ $Date: 2007-08-22 22:27:34 -0700 (Wed, 22 Aug 2007) $
+ */
+public class ActivationException extends Exception {
+    private static final long serialVersionUID = 8612661660934426123L;
+
+    public ActivationException(String message) {
+        super(message);
+    }
+
+    public ActivationException(Throwable cause) {
+        super(cause);
+    }
+}

Added: incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivator.java?rev=639535&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivator.java (added)
+++ incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivator.java Thu Mar 20 20:42:35 2008
@@ -0,0 +1,154 @@
+/*
+ * 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.apache.tuscany.sca.core.assembly;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.core.context.ComponentContextHelper;
+import org.apache.tuscany.sca.core.conversation.ConversationManager;
+import org.apache.tuscany.sca.core.invocation.ProxyFactory;
+import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+
+/**
+ * Start/stop a composite
+ * 
+ * @version $Rev: 575101 $ $Date: 2007-09-12 15:09:19 -0700 (Wed, 12 Sep 2007) $
+ */
+public interface CompositeActivator {
+    /**
+     * Activate a composite
+     * @param composite
+     */
+    void activate(Composite composite) throws ActivationException;
+
+    /**
+     * Activate a component reference
+     * @param component
+     * @param ref
+     */
+    void start(RuntimeComponent component, RuntimeComponentReference ref);
+    
+    /**
+     * Activate a component reference
+     * @param component
+     * @param ref
+     */
+    void activate(RuntimeComponent component, RuntimeComponentReference ref);
+
+    /**
+     * Activate a component reference
+     * @param component
+     * @param ref
+     */
+    void activate(RuntimeComponent component, RuntimeComponentService service);
+
+    /**
+     * De-activate a component reference
+     * @param component
+     * @param ref
+     */
+    void deactivate(RuntimeComponent component, RuntimeComponentReference ref);
+
+    /**
+     * De-activate a component reference
+     * @param component
+     * @param ref
+     */
+    void deactivate(RuntimeComponent component, RuntimeComponentService service);
+
+    /**
+     * Stop a composite
+     * @param composite
+     */
+    void deactivate(Composite composite) throws ActivationException;
+
+    /**
+     * Start a component
+     * @param component
+     */
+    void start(Component component) throws ActivationException;
+
+    /**
+     * Stop a component
+     * @param component
+     */
+    void stop(Component component) throws ActivationException;
+
+    /**
+     * Start components in a composite
+     * @param composite
+     */
+    void start(Composite composite) throws ActivationException;
+
+    /**
+     * Stop components in a composite
+     * @param composite
+     */
+    void stop(Composite composite) throws ActivationException;
+
+    /**
+     * Get the component context helper
+     * @return
+     */
+    ComponentContextHelper getComponentContextHelper();
+
+    /**
+     * Get the proxy factory
+     * @return
+     */
+    ProxyFactory getProxyFactory();
+
+    /**
+     * Get the java interface factory
+     * @return
+     */
+    JavaInterfaceFactory getJavaInterfaceFactory();
+    
+    ConversationManager getConversationManager();
+
+    /**
+     * Configure the runtime component with component context
+     * @param component
+     */
+    void configureComponentContext(RuntimeComponent component);
+
+    /**
+     * Resolve a component by URI in the domain
+     * @param componentURI
+     * @return
+     */
+    Component resolve(String componentURI);
+
+    /**
+     * Set the domain composite
+     * @param domainComposite
+     */
+    void setDomainComposite(Composite domainComposite);
+
+    /**
+     * Get the domain composite
+     * @return
+     */
+    Composite getDomainComposite();
+
+}

Added: incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivatorImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivatorImpl.java?rev=639535&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivatorImpl.java (added)
+++ incubator/tuscany/sandbox/mobile-android/core-android/src/main/java/org/apache/tuscany/sca/core/assembly/CompositeActivatorImpl.java Thu Mar 20 20:42:35 2008
@@ -0,0 +1,967 @@
+/*
+ * 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.apache.tuscany.sca.core.assembly;
+
+import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.tuscany.sca.assembly.AssemblyFactory;
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.ComponentReference;
+import org.apache.tuscany.sca.assembly.ComponentService;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.assembly.OptimizableBinding;
+import org.apache.tuscany.sca.assembly.Reference;
+import org.apache.tuscany.sca.assembly.SCABindingFactory;
+import org.apache.tuscany.sca.assembly.Service;
+import org.apache.tuscany.sca.context.RequestContextFactory;
+import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.core.context.ComponentContextHelper;
+import org.apache.tuscany.sca.core.context.ComponentContextImpl;
+import org.apache.tuscany.sca.core.conversation.ConversationManager;
+import org.apache.tuscany.sca.core.invocation.ProxyFactory;
+import org.apache.tuscany.sca.core.scope.ConversationalScopeContainer;
+import org.apache.tuscany.sca.core.scope.Scope;
+import org.apache.tuscany.sca.core.scope.ScopeContainer;
+import org.apache.tuscany.sca.core.scope.ScopeRegistry;
+import org.apache.tuscany.sca.core.scope.ScopedRuntimeComponent;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
+import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
+import org.apache.tuscany.sca.invocation.MessageFactory;
+import org.apache.tuscany.sca.provider.BindingProviderFactory;
+import org.apache.tuscany.sca.provider.ImplementationProvider;
+import org.apache.tuscany.sca.provider.ImplementationProviderFactory;
+import org.apache.tuscany.sca.provider.PolicyProvider;
+import org.apache.tuscany.sca.provider.PolicyProviderFactory;
+import org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint;
+import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
+import org.apache.tuscany.sca.provider.ServiceBindingProvider;
+import org.apache.tuscany.sca.runtime.EndpointReference;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentContext;
+import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+import org.apache.tuscany.sca.runtime.RuntimeWire;
+import org.apache.tuscany.sca.runtime.RuntimeWireProcessor;
+import org.apache.tuscany.sca.work.WorkScheduler;
+
+/**
+ * @version $Rev: 639277 $ $Date: 2008-03-20 06:02:37 -0700 (Thu, 20 Mar 2008) $
+ */
+public class CompositeActivatorImpl implements CompositeActivator {
+    private final static Logger logger = Logger.getLogger(CompositeActivatorImpl.class.getName());
+
+    private final AssemblyFactory assemblyFactory;
+    private final MessageFactory messageFactory;
+    private final InterfaceContractMapper interfaceContractMapper;
+    private final ScopeRegistry scopeRegistry;
+    private final WorkScheduler workScheduler;
+    private final RuntimeWireProcessor wireProcessor;
+    private final ProviderFactoryExtensionPoint providerFactories;
+
+    private final RequestContextFactory requestContextFactory;
+    private final ProxyFactory proxyFactory;
+    private final JavaInterfaceFactory javaInterfaceFactory;
+    private final ConversationManager conversationManager;
+
+    private final ComponentContextHelper componentContextHelper;
+
+    private Composite domainComposite;
+
+    /**
+     * @param assemblyFactory
+     * @param interfaceContractMapper
+     * @param workScheduler
+     * @param conversationManager TODO
+     * @param workContext
+     * @param wirePostProcessorRegistry
+     */
+    public CompositeActivatorImpl(AssemblyFactory assemblyFactory,
+                                  MessageFactory messageFactory,
+                                  JavaInterfaceFactory javaInterfaceFactory,
+                                  SCABindingFactory scaBindingFactory,
+                                  InterfaceContractMapper interfaceContractMapper,
+                                  ScopeRegistry scopeRegistry,
+                                  WorkScheduler workScheduler,
+                                  RuntimeWireProcessor wireProcessor,
+                                  RequestContextFactory requestContextFactory,
+                                  ProxyFactory proxyFactory,
+                                  ProviderFactoryExtensionPoint providerFactories,
+                                  StAXArtifactProcessorExtensionPoint processors,
+                                  ConversationManager conversationManager) {
+        this.assemblyFactory = assemblyFactory;
+        this.messageFactory = messageFactory;
+        this.interfaceContractMapper = interfaceContractMapper;
+        this.scopeRegistry = scopeRegistry;
+        this.workScheduler = workScheduler;
+        this.wireProcessor = wireProcessor;
+        this.providerFactories = providerFactories;
+        this.javaInterfaceFactory = javaInterfaceFactory;
+        this.requestContextFactory = requestContextFactory;
+        this.proxyFactory = proxyFactory;
+        this.conversationManager = conversationManager;
+        this.componentContextHelper = new ComponentContextHelper(assemblyFactory, javaInterfaceFactory, processors);
+    }
+
+    /**
+     * @see org.apache.tuscany.sca.core.assembly.CompositeActivator#activate(org.apache.tuscany.sca.runtime.RuntimeComponent, org.apache.tuscany.sca.runtime.RuntimeComponentReference)
+     */
+    public void activate(RuntimeComponent component, RuntimeComponentReference ref) {
+        if (logger.isLoggable(Level.FINE)) {
+            logger.fine("Activating component reference: " + component.getURI() + "#" + ref.getName());
+        }
+        resolveTargets(ref);
+        for (Binding binding : ref.getBindings()) {
+            addReferenceBindingProvider(component, ref, binding);
+        }
+    }
+
+    public void start(RuntimeComponent component, RuntimeComponentReference ref) {
+        synchronized (ref) {
+            resolveTargets(ref);
+            for (Binding binding : ref.getBindings()) {
+                ReferenceBindingProvider provider = ref.getBindingProvider(binding);
+                if (provider == null) {
+                    provider = addReferenceBindingProvider(component, ref, binding);
+                }
+                if (provider != null) {
+                    provider.start();
+                }
+                addReferenceWire(component, ref, binding);
+            }
+        }
+    }
+    
+    public void stop(Component component, ComponentReference reference)
+    {
+        if (logger.isLoggable(Level.FINE)) {
+            logger.fine("Starting component reference: " + component.getURI() + "#" + reference.getName());
+        }
+        RuntimeComponentReference runtimeRef = ((RuntimeComponentReference)reference);
+        for (Binding binding : reference.getBindings()) {
+            ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(binding);
+            if (bindingProvider != null) {
+                bindingProvider.stop();
+            }
+        }
+    }    
+
+    public void deactivate(RuntimeComponent component, RuntimeComponentReference ref) {
+        if (logger.isLoggable(Level.FINE)) {
+            logger.fine("Deactivating component reference: " + component.getURI() + "#" + ref.getName());
+        }
+        removeReferenceWires(ref);
+        for (Binding binding : ref.getBindings()) {
+            removeReferenceBindingProvider(component, ref, binding);
+        }
+
+    }
+
+    /**
+     * @param component
+     * @param reference
+     * @param binding
+     */
+    private ReferenceBindingProvider addReferenceBindingProvider(RuntimeComponent component,
+                                                                 RuntimeComponentReference reference,
+                                                                 Binding binding) {
+        BindingProviderFactory providerFactory =
+            (BindingProviderFactory)providerFactories.getProviderFactory(binding.getClass());
+        if (providerFactory != null) {
+            @SuppressWarnings("unchecked")
+            ReferenceBindingProvider bindingProvider =
+                providerFactory.createReferenceBindingProvider((RuntimeComponent)component,
+                                                               (RuntimeComponentReference)reference,
+                                                               binding);
+            if (bindingProvider != null) {
+                ((RuntimeComponentReference)reference).setBindingProvider(binding, bindingProvider);
+            }
+            for (PolicyProviderFactory f : providerFactories.getPolicyProviderFactories()) {
+                PolicyProvider policyProvider = f.createReferencePolicyProvider(component, reference, binding);
+                if (policyProvider != null) {
+                    reference.addPolicyProvider(binding, policyProvider);
+                }
+            }
+
+            return bindingProvider;
+        } else {
+            throw new IllegalStateException("Provider factory not found for class: " + binding.getClass().getName());
+        }
+    }
+
+    /**
+     * @param reference
+     */
+    private void resolveTargets(RuntimeComponentReference reference) {
+        
+/* Not used now that domain wires are created using the domain wire builder
+        // go over any targets that have not been resolved yet (as they are running on other nodes)
+        // and try an resolve them remotely
+        // TODO - this should work for any kind of wired binding but the only wireable binding 
+        //        is currently the SCA binding so we assume that
+        for (ComponentService service : reference.getTargets()) {
+            if (service.isUnresolved()) {
+                for (Binding binding : service.getBindings()) {
+                    
+
+                    //binding.setURI(service.getName());
+                    
+                    // TODO - we should look at all the bindings now associated with the 
+                    //        unresolved target but we assume the SCA binding here as
+                    //        its currently the only wireable one
+                    if (binding instanceof SCABinding) {
+                        OptimizableBinding scaBinding = (OptimizableBinding)binding;
+
+                        // clone the SCA binding and fill in service details 
+                        // its cloned as each target 
+                        SCABinding clonedSCABinding = null;
+                        try {
+                            clonedSCABinding = (SCABinding)((OptimizableBinding)scaBinding).clone();
+                            // TODO - Reusing the name here to store the target name so the 
+                            //        binding can be found again once the URI is set to the real endpoint
+                            clonedSCABinding.setName(service.getName());
+                            clonedSCABinding.setURI(service.getName());
+                            // wireable binding stuff needs to go. SCA binding uses it
+                            // currently to get to the service to work out if the service
+                            // is resolved. 
+                            OptimizableBinding endpoint = ((OptimizableBinding)clonedSCABinding);
+                            endpoint.setTargetComponentService(service);
+                            //endpoint.setTargetComponent(component); - not known for unresolved target
+                            //endpoint.setTargetBinding(serviceBinding); - not known for unresolved target
+
+                            // add the cloned SCA binding to the reference as it will be used to look up the 
+                            // provider later
+                            reference.getBindings().remove(binding);
+                            reference.getBindings().add(clonedSCABinding);
+                        } catch (Exception e) {
+                            // warning("The binding doesn't support clone: " + binding.getClass().getSimpleName(), binding);
+                        }
+                    } else {
+                        
+                         * Just leave the binding as it. It will be filled in later 
+                         * when the node resolves the targets
+                        throw new IllegalStateException(
+                                                        "Unable to create a distributed SCA binding provider for reference: " + reference
+                                                            .getName()
+                                                            + " and target: "
+                                                            + service.getName());
+                     
+                    }
+                }
+            }
+        }
+*/        
+    }
+
+    /**
+     * Create the runtime wires for a reference binding
+     * 
+     * @param component
+     * @param reference
+     * @param binding
+     */
+    private void addReferenceWire(Component component, ComponentReference reference, Binding binding) {
+        if (!(reference instanceof RuntimeComponentReference)) {
+            return;
+        }
+
+        // create wire if binding has an endpoint
+        Component targetComponent = null;
+        ComponentService targetComponentService = null;
+        Binding targetBinding = null;
+        if (binding instanceof OptimizableBinding) {
+            OptimizableBinding endpoint = (OptimizableBinding)binding;
+            targetComponent = endpoint.getTargetComponent();
+            targetComponentService = endpoint.getTargetComponentService();
+            targetBinding = endpoint.getTargetBinding();
+        }
+
+        // create a forward wire, either static or dynamic
+        addReferenceWire(component, reference, binding, targetComponent, targetComponentService, targetBinding);
+
+        /*
+        // if static forward wire (not from self-reference), try to create a static callback wire 
+        if (targetComponentService != null && !reference.getName().startsWith("$self$.")) {
+            ComponentReference callbackReference = targetComponentService.getCallbackReference();
+            if (callbackReference != null) {
+                Binding callbackBinding = null;
+                Binding callbackServiceBinding = null;
+                // select a service callback binding that can be wired back to this component
+                for (Binding refBinding : callbackReference.getBindings()) {
+                    // first look for a callback binding whose name matches the target binding name
+                    if (refBinding.getName().equals(targetBinding.getName())) {
+                        callbackBinding = refBinding;
+                        break;
+                    }
+                }
+                // see if there is a matching reference callback binding 
+                if (callbackBinding != null) {
+                    callbackServiceBinding = reference.getCallbackService().getBinding(callbackBinding.getClass());
+                }
+                // if there isn't an end-to-end match, try again based on target binding type
+                if (callbackBinding == null || callbackServiceBinding == null) {
+                    callbackBinding = callbackReference.getBinding(targetBinding.getClass());
+                    if (callbackBinding != null) {
+                        callbackServiceBinding = reference.getCallbackService().getBinding(callbackBinding.getClass());
+                    }
+                }
+                if (callbackBinding != null && callbackServiceBinding != null) {
+                    // end-to-end match, so create a static callback wire as well as the static forward wire
+        
+                    addReferenceWire(targetComponent, callbackReference, callbackBinding, component, reference
+                        .getCallbackService(), callbackServiceBinding);
+                } else {
+                    // no end-to-end match, so do not create a static callback wire
+                }
+            }
+        }
+        */
+    }
+
+    /**
+     * Create a reference wire for a forward call or a callback
+     * @param reference
+     * @param service
+     * @param serviceBinding
+     * @param component
+     * @param referenceBinding
+     */
+    private RuntimeWire addReferenceWire(Component refComponent,
+                                         ComponentReference reference,
+                                         Binding refBinding,
+                                         Component serviceComponent,
+                                         ComponentService service,
+                                         Binding serviceBinding) {
+        RuntimeComponentReference runtimeRef = (RuntimeComponentReference)reference;
+        InterfaceContract bindingContract = getInterfaceContract(reference, refBinding);
+
+        // Use the interface contract of the reference on the component type
+        Reference componentTypeRef = reference.getReference();
+        InterfaceContract sourceContract =
+            componentTypeRef == null ? reference.getInterfaceContract() : componentTypeRef.getInterfaceContract();
+        sourceContract = sourceContract.makeUnidirectional(false);
+
+        EndpointReference wireSource =
+            new EndpointReferenceImpl((RuntimeComponent)refComponent, reference, refBinding, sourceContract);
+        ComponentService callbackService = reference.getCallbackService();
+        if (callbackService != null) {
+            // select a reference callback binding to pass with invocations on this wire
+            Binding callbackBinding = null;
+            for (Binding binding : callbackService.getBindings()) {
+                // first look for a callback binding whose name matches the reference binding name
+            	if (refBinding.getName().startsWith(binding.getName())) {
+                    callbackBinding = binding;
+                    break;
+                }
+            }
+            // if no callback binding found, try again based on reference binding type
+            if (callbackBinding == null) {
+                callbackBinding = callbackService.getBinding(refBinding.getClass());
+            }
+            InterfaceContract callbackContract = callbackService.getInterfaceContract();
+            EndpointReference callbackEndpoint =
+                new EndpointReferenceImpl((RuntimeComponent)refComponent, callbackService, callbackBinding,
+                                          callbackContract);
+            wireSource.setCallbackEndpoint(callbackEndpoint);
+        }
+
+        EndpointReference wireTarget =
+            new EndpointReferenceImpl((RuntimeComponent)serviceComponent, service, serviceBinding, bindingContract);
+
+        RuntimeWire wire =
+            new RuntimeWireImpl(wireSource, wireTarget, interfaceContractMapper, workScheduler, wireProcessor,
+                                messageFactory, conversationManager);
+        runtimeRef.getRuntimeWires().add(wire);
+
+        return wire;
+    }
+
+    private void addImplementationProvider(RuntimeComponent component, Implementation implementation) {
+        ImplementationProviderFactory providerFactory =
+            (ImplementationProviderFactory)providerFactories.getProviderFactory(implementation.getClass());
+        if (providerFactory != null) {
+            @SuppressWarnings("unchecked")
+            ImplementationProvider implementationProvider =
+                providerFactory.createImplementationProvider(component, implementation);
+            if (implementationProvider != null) {
+                component.setImplementationProvider(implementationProvider);
+            }
+        } else {
+            throw new IllegalStateException("Provider factory not found for class: " + implementation.getClass()
+                .getName());
+        }
+        for (PolicyProviderFactory f : providerFactories.getPolicyProviderFactories()) {
+            PolicyProvider policyProvider = f.createImplementationPolicyProvider(component, implementation);
+            if (policyProvider != null) {
+                component.addPolicyProvider(policyProvider);
+            }
+        }
+        
+    }
+
+    private void removeImplementationProvider(RuntimeComponent component) {
+        component.setImplementationProvider(null);
+        component.getPolicyProviders().clear();
+    }
+
+    /**
+     * @param component
+     * @param service
+     * @param binding
+     */
+    private ServiceBindingProvider addServiceBindingProvider(RuntimeComponent component,
+                                                             RuntimeComponentService service,
+                                                             Binding binding) {
+        BindingProviderFactory providerFactory =
+            (BindingProviderFactory)providerFactories.getProviderFactory(binding.getClass());
+        if (providerFactory != null) {
+            @SuppressWarnings("unchecked")
+            ServiceBindingProvider bindingProvider =
+                providerFactory.createServiceBindingProvider((RuntimeComponent)component,
+                                                             (RuntimeComponentService)service,
+                                                             binding);
+            if (bindingProvider != null) {
+                ((RuntimeComponentService)service).setBindingProvider(binding, bindingProvider);
+            }
+            for (PolicyProviderFactory f : providerFactories.getPolicyProviderFactories()) {
+                PolicyProvider policyProvider = f.createServicePolicyProvider(component, service, binding);
+                if (policyProvider != null) {
+                    service.addPolicyProvider(binding, policyProvider);
+                }
+            }
+            return bindingProvider;
+        } else {
+            throw new IllegalStateException("Provider factory not found for class: " + binding.getClass().getName());
+        }
+    }
+
+    private void removeServiceBindingProvider(RuntimeComponent component,
+                                              RuntimeComponentService service,
+                                              Binding binding) {
+        service.setBindingProvider(binding, null);
+        for (Binding b : service.getBindings()) {
+            List<PolicyProvider> pps = service.getPolicyProviders(b);
+            if (pps != null) {
+                pps.clear();
+            }
+        }
+    }
+
+    private void removeReferenceBindingProvider(RuntimeComponent component,
+                                                RuntimeComponentReference reference,
+                                                Binding binding) {
+        reference.setBindingProvider(binding, null);
+        for (Binding b : reference.getBindings()) {
+            List<PolicyProvider> pps = reference.getPolicyProviders(b);
+            if (pps != null) {
+                pps.clear();
+            }
+        }
+    }
+
+    public void start(Composite composite) {
+        if (logger.isLoggable(Level.FINE)) {
+            logger.fine("Starting composite: " + composite.getName());
+        }
+        for (Component component : composite.getComponents()) {
+            start(component);
+        }
+    }
+
+    public void stop(Composite composite) {
+        if (logger.isLoggable(Level.FINE)) {
+            logger.fine("Stopping composite: " + composite.getName());
+        }
+        for (Component component : composite.getComponents()) {
+            stop(component);
+        }
+    }
+
+    public void start(Component component) {
+        if (logger.isLoggable(Level.FINE)) {
+            logger.fine("Starting component: " + component.getURI());
+        }
+        RuntimeComponent runtimeComponent = ((RuntimeComponent)component);
+        if(runtimeComponent.isStarted()) {
+        	return;
+        }
+        
+        configureComponentContext(runtimeComponent);
+
+        for (ComponentReference reference : component.getReferences()) {
+            if (logger.isLoggable(Level.FINE)) {
+                logger.fine("Starting component reference: " + component.getURI() + "#" + reference.getName());
+            }
+            RuntimeComponentReference runtimeRef = ((RuntimeComponentReference)reference);
+            runtimeRef.setComponent(runtimeComponent);
+            for (Binding binding : reference.getBindings()) {
+                ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(binding);
+                if (bindingProvider != null) {
+                    bindingProvider.start();
+                }
+            }
+        }
+
+        for (ComponentService service : component.getServices()) {
+            if (logger.isLoggable(Level.FINE)) {
+                logger.fine("Starting component service: " + component.getURI() + "#" + service.getName());
+            }
+            RuntimeComponentService runtimeService = (RuntimeComponentService)service;
+            for (Binding binding : service.getBindings()) {
+                ServiceBindingProvider bindingProvider = runtimeService.getBindingProvider(binding);
+                if (bindingProvider != null) {
+                    bindingProvider.start();
+                }
+            }
+        }
+
+        Implementation implementation = component.getImplementation();
+        if (implementation instanceof Composite) {
+            start((Composite)implementation);
+        } else {
+            ImplementationProvider implementationProvider = runtimeComponent.getImplementationProvider();
+            if (implementationProvider != null) {
+                implementationProvider.start();
+            }
+        }
+
+        if (component instanceof ScopedRuntimeComponent) {
+            ScopedRuntimeComponent scopedRuntimeComponent = (ScopedRuntimeComponent)component;
+            if (scopedRuntimeComponent.getScopeContainer() != null) {
+                scopedRuntimeComponent.getScopeContainer().start();
+            }
+        }
+
+        runtimeComponent.setStarted(true);
+    }
+
+    /**
+     * @param runtimeComponent
+     */
+    public void configureComponentContext(RuntimeComponent runtimeComponent) {
+        RuntimeComponentContext componentContext =
+            new ComponentContextImpl(this, assemblyFactory, proxyFactory, interfaceContractMapper,
+                                     requestContextFactory, javaInterfaceFactory, runtimeComponent);
+        runtimeComponent.setComponentContext(componentContext);
+    }
+
+    /**
+     * Stop a component
+     */
+    public void stop(Component component) {
+    	if (!((RuntimeComponent)component).isStarted()) {
+    		return;
+        }
+        if (logger.isLoggable(Level.FINE)) {
+            logger.fine("Stopping component: " + component.getURI());
+        }
+        for (ComponentService service : component.getServices()) {
+            if (logger.isLoggable(Level.FINE)) {
+                logger.fine("Stopping component service: " + component.getURI() + "#" + service.getName());
+            }
+            for (Binding binding : service.getBindings()) {
+                ServiceBindingProvider bindingProvider = ((RuntimeComponentService)service).getBindingProvider(binding);
+                if (bindingProvider != null) {
+                    bindingProvider.stop();
+                }
+            }
+        }
+        for (ComponentReference reference : component.getReferences()) {
+            if (logger.isLoggable(Level.FINE)) {
+                logger.fine("Starting component reference: " + component.getURI() + "#" + reference.getName());
+            }
+            RuntimeComponentReference runtimeRef = ((RuntimeComponentReference)reference);
+            for (Binding binding : reference.getBindings()) {
+                ReferenceBindingProvider bindingProvider = runtimeRef.getBindingProvider(binding);
+                if (bindingProvider != null) {
+                    bindingProvider.stop();
+                }
+            }
+        }
+        Implementation implementation = component.getImplementation();
+        if (implementation instanceof Composite) {
+            stop((Composite)implementation);
+        } else {
+            ImplementationProvider implementationProvider = ((RuntimeComponent)component).getImplementationProvider();
+            if (implementationProvider != null) {
+                implementationProvider.stop();
+            }
+        }
+
+        if (component instanceof ScopedRuntimeComponent) {
+            ScopedRuntimeComponent runtimeComponent = (ScopedRuntimeComponent)component;
+            if (runtimeComponent.getScopeContainer() != null && 
+            		runtimeComponent.getScopeContainer().getLifecycleState() != ScopeContainer.STOPPED) {
+                runtimeComponent.getScopeContainer().stop();
+            }
+        }
+
+        ((RuntimeComponent)component).setStarted(false);
+    }
+
+    /**
+     * Get the effective interface contract for a reference binding
+     * 
+     * @param reference
+     * @param binding
+     * @return
+     */
+    private InterfaceContract getInterfaceContract(ComponentReference reference, Binding binding) {
+        InterfaceContract interfaceContract = reference.getInterfaceContract();
+        ReferenceBindingProvider provider = ((RuntimeComponentReference)reference).getBindingProvider(binding);
+        if (provider != null) {
+            InterfaceContract bindingContract = provider.getBindingInterfaceContract();
+            if (bindingContract != null) {
+                interfaceContract = bindingContract;
+            }
+        }
+        return interfaceContract.makeUnidirectional(false);
+    }
+
+    /**
+     * Remove the runtime wires for a reference binding
+     * @param reference
+     */
+    private void removeReferenceWires(ComponentReference reference) {
+        if (!(reference instanceof RuntimeComponentReference)) {
+            return;
+        }
+        // [rfeng] Comment out the following statements to avoid the on-demand activation
+        // RuntimeComponentReference runtimeRef = (RuntimeComponentReference)reference;
+        // runtimeRef.getRuntimeWires().clear();
+    }
+
+    /**
+     * Get the effective interface contract for the service binding
+     * 
+     * @param service
+     * @param binding
+     * @return
+     */
+    private InterfaceContract getInterfaceContract(ComponentService service, Binding binding) {
+        InterfaceContract interfaceContract = service.getInterfaceContract();
+
+        ServiceBindingProvider provider = ((RuntimeComponentService)service).getBindingProvider(binding);
+        if (provider != null) {
+            InterfaceContract bindingContract = provider.getBindingInterfaceContract();
+            if (bindingContract != null) {
+                interfaceContract = bindingContract;
+            }
+        }
+        return interfaceContract.makeUnidirectional(false);
+    }
+
+    /**
+     * Remove runtime wires for a service binding
+     * 
+     * @param component
+     * @param service
+     */
+    private void removeServiceWires(ComponentService service) {
+        if (!(service instanceof RuntimeComponentService)) {
+            return;
+        }
+        RuntimeComponentService runtimeService = (RuntimeComponentService)service;
+        runtimeService.getRuntimeWires().clear();
+    }
+
+    /**
+     * Create a service wire for a forward call or a callback
+     * @param service
+     * @param serviceBinding
+     * @param reference
+     * @param component
+     * @param referenceBinding
+     */
+    private RuntimeWire addServiceWire(Component serviceComponent, ComponentService service, Binding serviceBinding) {
+        if (!(service instanceof RuntimeComponentService)) {
+            return null;
+        }
+        RuntimeComponentService runtimeService = (RuntimeComponentService)service;
+
+        // FIXME: [rfeng] We might need a better way to get the impl interface contract
+        Service targetService = service.getService();
+        if (targetService == null) {
+            targetService = service;
+        }
+        InterfaceContract targetContract = targetService.getInterfaceContract().makeUnidirectional(false);
+
+        InterfaceContract sourceContract = getInterfaceContract(service, serviceBinding);
+
+        EndpointReference wireSource = new EndpointReferenceImpl(null, null, serviceBinding, sourceContract);
+
+        EndpointReference wireTarget =
+            new EndpointReferenceImpl((RuntimeComponent)serviceComponent, (RuntimeComponentService)service,
+                                      serviceBinding, targetContract);
+
+        RuntimeWire wire =
+            new RuntimeWireImpl(wireSource, wireTarget, interfaceContractMapper, workScheduler, wireProcessor,
+                                messageFactory, conversationManager);
+        runtimeService.getRuntimeWires().add(wire);
+
+        return wire;
+    }
+
+    public void activate(RuntimeComponent component, RuntimeComponentService service) {
+        if (service.getService() == null) {
+            if (logger.isLoggable(Level.WARNING)) {
+                logger.warning("Skipping component service not defined in the component type: " + component.getURI()
+                    + "#"
+                    + service.getName());
+            }
+            return;
+        }
+        if (logger.isLoggable(Level.FINE)) {
+            logger.fine("Activating component service: " + component.getURI() + "#" + service.getName());
+        }
+
+        for (Binding binding : service.getBindings()) {
+            addServiceBindingProvider(component, service, binding);
+            addServiceWire(component, service, binding);
+        }
+    }
+
+    public void deactivate(RuntimeComponent component, RuntimeComponentService service) {
+        if (logger.isLoggable(Level.FINE)) {
+            logger.fine("Deactivating component service: " + component.getURI() + "#" + service.getName());
+        }
+        removeServiceWires(service);
+        for (Binding binding : service.getBindings()) {
+            removeServiceBindingProvider(component, service, binding);
+        }
+    }
+
+    private void addScopeContainer(Component component) {
+        if (!(component instanceof ScopedRuntimeComponent)) {
+            return;
+        }
+        ScopedRuntimeComponent runtimeComponent = (ScopedRuntimeComponent)component;
+        ScopeContainer scopeContainer = scopeRegistry.getScopeContainer(runtimeComponent);
+        if (scopeContainer != null && scopeContainer.getScope() == Scope.CONVERSATION) {
+            conversationManager.addListener((ConversationalScopeContainer)scopeContainer);
+        }
+        runtimeComponent.setScopeContainer(scopeContainer);
+    }
+
+    private void removeScopeContainer(Component component) {
+        if (!(component instanceof ScopedRuntimeComponent)) {
+            return;
+        }
+        ScopedRuntimeComponent runtimeComponent = (ScopedRuntimeComponent)component;
+        ScopeContainer scopeContainer = runtimeComponent.getScopeContainer();
+        if(scopeContainer != null && scopeContainer.getScope() == Scope.CONVERSATION) {
+            conversationManager.removeListener((ConversationalScopeContainer) scopeContainer);
+        }        
+        runtimeComponent.setScopeContainer(null);
+    }
+    
+    public void activateComponent(Component component)
+            throws ActivationException {
+        try {
+            if (logger.isLoggable(Level.FINE)) {
+                logger.fine("Activating component: " + component.getURI());
+            }
+
+            Implementation implementation = component.getImplementation();
+            if (implementation instanceof Composite) {
+                activate((Composite) implementation);
+            } else if (implementation != null) {
+                addImplementationProvider((RuntimeComponent) component,
+                        implementation);
+                addScopeContainer(component);
+            }
+
+            for (ComponentService service : component.getServices()) {
+                activate((RuntimeComponent) component,
+                        (RuntimeComponentService) service);
+            }
+
+            for (ComponentReference reference : component.getReferences()) {
+                activate((RuntimeComponent) component,
+                        (RuntimeComponentReference) reference);
+            }
+        } catch (Exception e) {
+            throw new ActivationException(e);
+        }
+    }
+
+    public void deactivateComponent(Component component)
+            throws ActivationException {
+        try {
+            if (logger.isLoggable(Level.FINE)) {
+                logger.fine("Deactivating component: " + component.getURI());
+            }
+            for (ComponentService service : component.getServices()) {
+                deactivate((RuntimeComponent) component,
+                        (RuntimeComponentService) service);
+            }
+
+            for (ComponentReference reference : component.getReferences()) {
+                deactivate((RuntimeComponent) component,
+                        (RuntimeComponentReference) reference);
+            }
+
+            Implementation implementation = component.getImplementation();
+            if (implementation instanceof Composite) {
+                deactivate((Composite) implementation);
+            } else if (implementation != null) {
+                removeImplementationProvider((RuntimeComponent) component);
+                removeScopeContainer(component);
+            }
+        } catch (Exception e) {
+            throw new ActivationException(e);
+        }
+    }    
+
+    public void activate(Composite composite) throws ActivationException {
+        try {
+            if (logger.isLoggable(Level.FINE)) {
+                logger.fine("Activating composite: " + composite.getName());
+            }
+            for (Component component : composite.getComponents()) {
+                if (logger.isLoggable(Level.FINE)) {
+                    logger.fine("Activating component: " + component.getURI());
+                }
+
+                Implementation implementation = component.getImplementation();
+                if (implementation instanceof Composite) {
+                    activate((Composite)implementation);
+                } else if (implementation != null) {
+                    addImplementationProvider((RuntimeComponent)component, implementation);
+                    addScopeContainer(component);
+                }
+
+                for (ComponentService service : component.getServices()) {
+                    activate((RuntimeComponent)component, (RuntimeComponentService)service);
+                }
+
+                for (ComponentReference reference : component.getReferences()) {
+                    activate((RuntimeComponent)component, (RuntimeComponentReference)reference);
+                }
+            }
+        } catch (Exception e) {
+            throw new ActivationException(e);
+        }
+    }
+
+    public void deactivate(Composite composite) throws ActivationException {
+        try {
+            if (logger.isLoggable(Level.FINE)) {
+                logger.fine("Deactivating composite: " + composite.getName());
+            }
+            for (Component component : composite.getComponents()) {
+                if (logger.isLoggable(Level.FINE)) {
+                    logger.fine("Deactivating component: " + component.getURI());
+                }
+                for (ComponentService service : component.getServices()) {
+                    deactivate((RuntimeComponent)component, (RuntimeComponentService)service);
+                }
+
+                for (ComponentReference reference : component.getReferences()) {
+                    deactivate((RuntimeComponent)component, (RuntimeComponentReference)reference);
+                }
+
+                Implementation implementation = component.getImplementation();
+                if (implementation instanceof Composite) {
+                    deactivate((Composite)implementation);
+                } else if (implementation != null) {
+                    removeImplementationProvider((RuntimeComponent)component);
+                    removeScopeContainer(component);
+                }
+            }
+        } catch (Exception e) {
+            throw new ActivationException(e);
+        }
+    }
+
+    /**
+     * @return the referenceHelper
+     */
+    public ComponentContextHelper getComponentContextHelper() {
+        return componentContextHelper;
+    }
+
+    /**
+     * @return the proxyFactory
+     */
+    public ProxyFactory getProxyFactory() {
+        return proxyFactory;
+    }
+
+    /**
+     * @return the domainComposite
+     */
+    public Composite getDomainComposite() {
+        return domainComposite;
+    }
+
+    /**
+     * @param domainComposite the domainComposite to set
+     */
+    public void setDomainComposite(Composite domainComposite) {
+        this.domainComposite = domainComposite;
+    }
+
+    public Component resolve(String componentURI) {
+        for (Composite composite : domainComposite.getIncludes()) {
+            Component component = resolve(composite, componentURI);
+            if (component != null) {
+                return component;
+            }
+        }
+        return null;
+    }
+
+    public Component resolve(Composite composite, String componentURI) {
+        for (Component component : composite.getComponents()) {
+            String uri = component.getURI();
+            if (uri.equals(componentURI)) {
+                return component;
+            }
+            if (componentURI.startsWith(uri)) {
+                Implementation implementation = component.getImplementation();
+                if (!(implementation instanceof Composite)) {
+                    return null;
+                }
+                return resolve((Composite)implementation, componentURI);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * @return the javaInterfaceFactory
+     */
+    public JavaInterfaceFactory getJavaInterfaceFactory() {
+        return javaInterfaceFactory;
+    }
+
+    /**
+     * @return the conversationManager
+     */
+    public ConversationManager getConversationManager() {
+        return conversationManager;
+    }
+    
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org