Author: antelder
Date: Fri Mar 14 08:28:59 2008
New Revision: 637134

URL: http://svn.apache.org/viewvc?rev=637134&view=rev
Log:
TUSCANY-2068, apply patch from Graham Charters to fix the passbyreference and 
callback problems in implementation.osgi

Modified:
    
incubator/tuscany/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/invocation/OSGiImplementationProvider.java
    
incubator/tuscany/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/invocation/OSGiRemotableInvoker.java

Modified: 
incubator/tuscany/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/invocation/OSGiImplementationProvider.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/invocation/OSGiImplementationProvider.java?rev=637134&r1=637133&r2=637134&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/invocation/OSGiImplementationProvider.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/invocation/OSGiImplementationProvider.java
 Fri Mar 14 08:28:59 2008
@@ -911,13 +911,13 @@
                         resolveWireRegisterProxyService(osgiBundle, 
interfaceClasses[index], wire);
                     index++;
                 }
-                for (ComponentService service : 
runtimeComponent.getServices()) {
+/*                for (ComponentService service : 
runtimeComponent.getServices()) {
                     if (interfaceClasses[index] != null) {
                         registerCallbackProxyService(osgiBundle, 
interfaceClasses[index],
                                 ((RuntimeComponentService)service));
                     }
                     index++;
-                }
+                } */
             }
             else if (osgiBundle.getState() == Bundle.INSTALLED && packageAdmin 
!= null) {
                 packageAdmin.resolveBundles(new Bundle[] {osgiBundle});

Modified: 
incubator/tuscany/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/invocation/OSGiRemotableInvoker.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/invocation/OSGiRemotableInvoker.java?rev=637134&r1=637133&r2=637134&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/invocation/OSGiRemotableInvoker.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/implementation-osgi/src/main/java/org/apache/tuscany/sca/implementation/osgi/invocation/OSGiRemotableInvoker.java
 Fri Mar 14 08:28:59 2008
@@ -29,14 +29,16 @@
 import org.apache.tuscany.sca.implementation.osgi.context.OSGiAnnotations;
 import org.apache.tuscany.sca.interfacedef.DataType;
 import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Interceptor;
 import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.invocation.DataExchangeSemantics;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
 
 /**
  * An interceptor to enforce pass-by-value semantics for remotable interfaces
  * 
  */
-public class OSGiRemotableInvoker extends OSGiTargetInvoker {
+public class OSGiRemotableInvoker extends OSGiTargetInvoker implements 
DataExchangeSemantics {
     
     private DataBindingExtensionPoint registry;
     private Operation operation;
@@ -127,5 +129,13 @@
         }
         return copiedArg;
     }
+
+
+    /**
+     * @see 
org.apache.tuscany.sca.invocation.PassByValueAware#allowsPassByReference()
+     */
+    public boolean allowsPassByReference() {
+               return true;
+       }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to