tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r810830 - in /tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl: BaseConfigurationBuilderImpl.java ComponentServicePromotionBuilderImpl.java CompositeServicePromotionBuilderImpl.java
Date Thu, 03 Sep 2009 08:55:41 GMT
Author: nash
Date: Thu Sep  3 08:55:41 2009
New Revision: 810830

URL: http://svn.apache.org/viewvc?rev=810830&view=rev
Log:
Fix TUSCANY-3254: null returned by RequestContext.getCallbackReference()

Modified:
    tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
    tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java
    tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java

Modified: tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java?rev=810830&r1=810829&r2=810830&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
(original)
+++ tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
Thu Sep  3 08:55:41 2009
@@ -792,6 +792,19 @@
      * @param service
      */
     private ComponentReference createCallbackReference(Component component, ComponentService
service) {
+        return createCallbackReference(component, service, assemblyFactory);
+    }
+
+    /**
+     * Create a callback reference for a component service
+     * 
+     * @param component
+     * @param service
+     * @param assemblyFactory
+     */
+    protected static ComponentReference createCallbackReference(Component component,
+                                                                ComponentService service,
+                                                                AssemblyFactory assemblyFactory)
{
         ComponentReference componentReference = assemblyFactory.createComponentReference();
         componentReference.setIsCallback(true);
         componentReference.setName(service.getName());

Modified: tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java?rev=810830&r1=810829&r2=810830&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java
(original)
+++ tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java
Thu Sep  3 08:55:41 2009
@@ -21,6 +21,7 @@
 
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 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.CompositeService;
@@ -83,6 +84,11 @@
                                 newComponentService.setCallback(assemblyFactory.createCallback());
                                 newComponentService.getCallback().getBindings()
                                         .addAll(componentService.getCallback().getBindings());
+                                ComponentReference callbackReference =
+                                    BaseConfigurationBuilderImpl.createCallbackReference(promotedComponent,
newComponentService,
+                                                                                        
assemblyFactory);
+                                callbackReference.getBindings().addAll(componentService.getCallback().getBindings());
+                                newComponentService.setCallbackReference(callbackReference);
                             }
 
                             // Change the composite service to now promote the

Modified: tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java?rev=810830&r1=810829&r2=810830&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java
(original)
+++ tuscany/branches/sca-java-1.5.1/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java
Thu Sep  3 08:55:41 2009
@@ -21,6 +21,7 @@
 
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 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.CompositeService;
@@ -64,6 +65,11 @@
                     newComponentService.setCallback(assemblyFactory.createCallback());
                     newComponentService.getCallback().getBindings()
                             .addAll(compositeService.getCallback().getBindings());
+                    ComponentReference callbackReference =
+                        BaseConfigurationBuilderImpl.createCallbackReference(promotedComponent,
newComponentService,
+                                                                             assemblyFactory);
+                    callbackReference.getBindings().addAll(compositeService.getCallback().getBindings());
+                    newComponentService.setCallbackReference(callbackReference);
                 }
 
                 // Change the composite service to now promote the newly



Mime
View raw message