summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-03-05 10:51:46 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-03-05 10:51:46 +0000
commit27e7df7cfb7e9d33348dc32652a65d373fd146f9 (patch)
tree56e228f2b632c662bfb3d6de948367e88fdb0f11 /sca-java-2.x/trunk/modules/core
parenta421eb4e64a674d28803c2f043655fadea594046 (diff)
Fix dependency tangle by removing the dependency on node from core
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1078265 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core')
-rw-r--r--sca-java-2.x/trunk/modules/core/pom.xml6
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java32
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java31
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java14
4 files changed, 30 insertions, 53 deletions
diff --git a/sca-java-2.x/trunk/modules/core/pom.xml b/sca-java-2.x/trunk/modules/core/pom.xml
index 8eee896831..8354a8e925 100644
--- a/sca-java-2.x/trunk/modules/core/pom.xml
+++ b/sca-java-2.x/trunk/modules/core/pom.xml
@@ -54,12 +54,6 @@
</dependency>
<dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-node-api</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2</version>
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
index 0f86ee79ba..7dc1a7639a 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
@@ -58,6 +58,7 @@ import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistryLocator;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory;
@@ -83,7 +84,6 @@ import org.apache.tuscany.sca.invocation.InvokerAsyncResponse;
import org.apache.tuscany.sca.invocation.Message;
import org.apache.tuscany.sca.invocation.MessageFactory;
import org.apache.tuscany.sca.invocation.Phase;
-import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.provider.BindingProviderFactory;
import org.apache.tuscany.sca.provider.EndpointAsyncProvider;
import org.apache.tuscany.sca.provider.EndpointProvider;
@@ -919,23 +919,19 @@ public class RuntimeEndpointImpl extends EndpointImpl implements RuntimeEndpoint
} else {
// In this case, we assume that we're running on a detached (non Tuscany) thread and
// as a result we need to connect back to the Tuscany environment...
- for( NodeFactory factory : NodeFactory.getNodeFactories() ) {
- ExtensionPointRegistry registry = factory.getExtensionPointRegistry();
- if( registry != null ) {
- this.registry = registry;
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- this.interfaceContractMapper = utilities.getUtility(InterfaceContractMapper.class);
- this.serializer = utilities.getUtility(EndpointSerializer.class);
- RuntimeEndpointImpl ep = (RuntimeEndpointImpl)serializer.readEndpoint(xml);
- // Find the actual Endpoint in the EndpointRegistry
- ep = findActualEP( ep, registry );
-
- if( ep != null ){
- copyFrom( ep );
- break;
- } // end if
- } // end if
- } // end for
+ ExtensionPointRegistry registry = ExtensionPointRegistryLocator.getExtensionPointRegistry();
+ if( registry != null ) {
+ this.registry = registry;
+ UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
+ this.interfaceContractMapper = utilities.getUtility(InterfaceContractMapper.class);
+ this.serializer = utilities.getUtility(EndpointSerializer.class);
+ RuntimeEndpointImpl ep = (RuntimeEndpointImpl)serializer.readEndpoint(xml);
+ // Find the actual Endpoint in the EndpointRegistry
+ ep = findActualEP( ep, registry );
+ if( ep != null ){
+ copyFrom( ep );
+ } // end if
+ } // end if
} // end if
} // end if
super.resolve();
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java
index 5031ccb73a..410056628b 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointReferenceImpl.java
@@ -38,7 +38,6 @@ import org.apache.tuscany.sca.assembly.ComponentService;
import org.apache.tuscany.sca.assembly.CompositeReference;
import org.apache.tuscany.sca.assembly.CompositeService;
import org.apache.tuscany.sca.assembly.Contract;
-import org.apache.tuscany.sca.assembly.Endpoint;
import org.apache.tuscany.sca.assembly.EndpointReference;
import org.apache.tuscany.sca.assembly.builder.BindingBuilder;
import org.apache.tuscany.sca.assembly.builder.BuilderContext;
@@ -46,6 +45,7 @@ import org.apache.tuscany.sca.assembly.builder.BuilderExtensionPoint;
import org.apache.tuscany.sca.assembly.impl.EndpointReferenceImpl;
import org.apache.tuscany.sca.context.CompositeContext;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistryLocator;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory;
@@ -71,7 +71,6 @@ import org.apache.tuscany.sca.invocation.InvokerAsyncResponse;
import org.apache.tuscany.sca.invocation.Message;
import org.apache.tuscany.sca.invocation.MessageFactory;
import org.apache.tuscany.sca.invocation.Phase;
-import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.provider.BindingProviderFactory;
import org.apache.tuscany.sca.provider.EndpointReferenceProvider;
import org.apache.tuscany.sca.provider.ImplementationAsyncProvider;
@@ -643,22 +642,18 @@ public class RuntimeEndpointReferenceImpl extends EndpointReferenceImpl implemen
} else {
// In this case, we assume that we're running on a detached (non Tuscany) thread and
// as a result we need to connect back to the Tuscany environment...
- for( NodeFactory factory : NodeFactory.getNodeFactories() ) {
- ExtensionPointRegistry registry = factory.getExtensionPointRegistry();
- if( registry != null ) {
- this.registry = registry;
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- this.serializer = utilities.getUtility(EndpointSerializer.class);
- RuntimeEndpointReferenceImpl epr = (RuntimeEndpointReferenceImpl)serializer.readEndpointReference(xml);
- // Find the actual Endpoint in the EndpointRegistry
- epr = findActualEPR( epr, registry );
-
- if( epr != null ){
- copyFrom( epr );
- break;
- } // end if
- } // end if
- } // end for
+ ExtensionPointRegistry registry = ExtensionPointRegistryLocator.getExtensionPointRegistry();
+ if( registry != null ) {
+ this.registry = registry;
+ UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
+ this.serializer = utilities.getUtility(EndpointSerializer.class);
+ RuntimeEndpointReferenceImpl epr = (RuntimeEndpointReferenceImpl)serializer.readEndpointReference(xml);
+ // Find the actual Endpoint in the EndpointRegistry
+ epr = findActualEPR( epr, registry );
+ if( epr != null ){
+ copyFrom( epr );
+ } // end if
+ } // end if
} // end if
}
super.resolve();
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
index da1c7f365e..1186da72f0 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
@@ -22,8 +22,6 @@ package org.apache.tuscany.sca.core.invocation;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
-import java.util.Collection;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -31,24 +29,18 @@ import org.apache.tuscany.sca.assembly.Endpoint;
import org.apache.tuscany.sca.assembly.EndpointReference;
import org.apache.tuscany.sca.context.CompositeContext;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ExtensionPointRegistryLocator;
import org.apache.tuscany.sca.core.FactoryExtensionPoint;
-import org.apache.tuscany.sca.core.UtilityExtensionPoint;
-import org.apache.tuscany.sca.core.assembly.impl.RuntimeEndpointImpl;
-import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
import org.apache.tuscany.sca.invocation.InvokerAsyncResponse;
import org.apache.tuscany.sca.invocation.Message;
import org.apache.tuscany.sca.invocation.MessageFactory;
-import org.apache.tuscany.sca.node.NodeFactory;
import org.apache.tuscany.sca.provider.EndpointAsyncProvider;
import org.apache.tuscany.sca.runtime.DomainRegistryFactory;
import org.apache.tuscany.sca.runtime.EndpointRegistry;
-import org.apache.tuscany.sca.runtime.EndpointSerializer;
import org.apache.tuscany.sca.runtime.ExtensibleDomainRegistryFactory;
import org.apache.tuscany.sca.runtime.RuntimeEndpoint;
import org.apache.tuscany.sca.runtime.RuntimeEndpointReference;
-import org.oasisopen.sca.ComponentContext;
/**
* A class that wraps the mechanics for sending async responses
@@ -309,8 +301,8 @@ public class AsyncResponseInvoker<T> implements InvokerAsyncResponse, Serializab
} // end if
// Deal with the case where there is no context available
- for( NodeFactory factory : NodeFactory.getNodeFactories() ) {
- registry = factory.getExtensionPointRegistry();
+ for(ExtensionPointRegistry r : ExtensionPointRegistryLocator.getExtensionPointRegistries()) {
+ registry = r;
if( registry != null ) {
// Find the actual Endpoint in the EndpointRegistry
endpointRegistry = getEndpointRegistry( registry );