atom feed1 message in org.apache.tuscany.commitssvn commit: r1044003 - /tuscany/sca-j...
FromSent OnAttachments
edwa...@apache.orgDec 9, 2010 7:26 am 
Subject:svn commit: r1044003 - /tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
From:edwa...@apache.org (edwa@apache.org)
Date:Dec 9, 2010 7:26:06 am
List:org.apache.tuscany.commits

Author: edwardsmj Date: Thu Dec 9 15:26:05 2010 New Revision: 1044003

URL: http://svn.apache.org/viewvc?rev=1044003&view=rev Log: Provide necessary additional in the service endpoint for Async service support
for all binding types, as under TUSCANY-3807

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java

Modified:
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java?rev=1044003&r1=1044002&r2=1044003&view=diff ============================================================================== ---
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
(original) +++
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/RuntimeEndpointImpl.java
Thu Dec 9 15:26:05 2010 @@ -44,6 +44,7 @@ import org.apache.tuscany.sca.assembly.C import org.apache.tuscany.sca.assembly.CompositeService; import org.apache.tuscany.sca.assembly.Contract; import org.apache.tuscany.sca.assembly.EndpointReference; +import org.apache.tuscany.sca.assembly.Reference; import org.apache.tuscany.sca.assembly.Service; import org.apache.tuscany.sca.assembly.builder.BindingBuilder; import org.apache.tuscany.sca.assembly.builder.BuilderContext; @@ -423,7 +424,7 @@ public class RuntimeEndpointImpl extends

// Create pseudo-reference ComponentReference reference =
assemblyFactory.createComponentReference(); - ExtensionPointRegistry registry =
compositeContext.getExtensionPointRegistry(); + ExtensionPointRegistry registry =
compositeContext.getExtensionPointRegistry(); FactoryExtensionPoint modelFactories =
registry.getExtensionPoint(FactoryExtensionPoint.class); JavaInterfaceFactory javaInterfaceFactory =
(JavaInterfaceFactory)modelFactories.getFactory(JavaInterfaceFactory.class); JavaInterfaceContract interfaceContract =
javaInterfaceFactory.createJavaInterfaceContract(); @@ -436,6 +437,14 @@ public class RuntimeEndpointImpl extends String referenceName = endpoint.getService().getName() +
"_asyncCallback"; reference.setName(referenceName); reference.setForCallback(true); + // Add in "implementation" reference (really a dummy, but with correct
interface) + Reference implReference = assemblyFactory.createReference(); + implReference.setInterfaceContract(interfaceContract); + implReference.setName(referenceName); + implReference.setForCallback(true); + + reference.setReference(implReference); + // Set the created ComponentReference into the EPR epr.setReference(reference);

// Create a binding