tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r830703 - in /tuscany/branches/sca-java-1.5.2/modules/core: ./ src/main/java/org/apache/tuscany/sca/core/context/ src/main/java/org/apache/tuscany/sca/core/invocation/
Date Wed, 28 Oct 2009 18:07:01 GMT
Author: rfeng
Date: Wed Oct 28 18:07:01 2009
New Revision: 830703

URL: http://svn.apache.org/viewvc?rev=830703&view=rev
Log:
Merge the fix for TUSCANY-3348 (perf improvement) from 1.x to 1.5.2

Modified:
    tuscany/branches/sca-java-1.5.2/modules/core/   (props changed)
    tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/context/CallableReferenceImpl.java
    tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKCallbackInvocationHandler.java
    tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java

Propchange: tuscany/branches/sca-java-1.5.2/modules/core/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Wed Oct 28 18:07:01 2009
@@ -0,0 +1,2 @@
+/tuscany/branches/sca-java-1.3/modules/core:671193
+/tuscany/branches/sca-java-1.x/modules/core:830700

Modified: tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/context/CallableReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/context/CallableReferenceImpl.java?rev=830703&r1=830702&r2=830703&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/context/CallableReferenceImpl.java
(original)
+++ tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/context/CallableReferenceImpl.java
Wed Oct 28 18:07:01 2009
@@ -370,7 +370,7 @@
                 }
                 this.proxyFactory = compositeActivator.getProxyFactory();
             }
-        } else {
+        } else if (compositeActivator == null || proxyFactory == null) {
             this.compositeActivator = ComponentContextHelper.getCurrentCompositeActivator();
             if (this.compositeActivator != null) {
                 this.proxyFactory = this.compositeActivator.getProxyFactory();

Modified: tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKCallbackInvocationHandler.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKCallbackInvocationHandler.java?rev=830703&r1=830702&r2=830703&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKCallbackInvocationHandler.java
(original)
+++ tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKCallbackInvocationHandler.java
Wed Oct 28 18:07:01 2009
@@ -24,8 +24,11 @@
 import org.apache.tuscany.sca.core.assembly.RuntimeWireImpl;
 import org.apache.tuscany.sca.core.context.CallableReferenceImpl;
 import org.apache.tuscany.sca.core.conversation.ConversationState;
+import org.apache.tuscany.sca.core.scope.TargetResolutionException;
 import org.apache.tuscany.sca.invocation.InvocationChain;
+import org.apache.tuscany.sca.invocation.Message;
 import org.apache.tuscany.sca.invocation.MessageFactory;
+import org.apache.tuscany.sca.runtime.ReferenceParameters;
 import org.apache.tuscany.sca.runtime.RuntimeWire;
 import org.osoa.sca.NoRegisteredCallbackException;
 import org.osoa.sca.ServiceRuntimeException;
@@ -106,5 +109,16 @@
             ((RuntimeWireImpl)wire).releaseWire();
         }
     }
+    
+    /**
+     * 
+     */
+    @Override
+    protected void handleCallback(Message msg, RuntimeWire wire, Object currentConversationID)
+        throws TargetResolutionException {
+        ReferenceParameters parameters = msg.getFrom().getReferenceParameters();
+        parameters.setCallbackID(getCallbackID());
+    }
+
 
 }

Modified: tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java?rev=830703&r1=830702&r2=830703&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java
(original)
+++ tuscany/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java
Wed Oct 28 18:07:01 2009
@@ -381,14 +381,15 @@
      * @param interfaze
      * @throws TargetResolutionException
      */
-    private void handleCallback(Message msg, RuntimeWire wire, Object currentConversationID)
+    protected void handleCallback(Message msg, RuntimeWire wire, Object currentConversationID)
         throws TargetResolutionException {
-        ReferenceParameters parameters = msg.getFrom().getReferenceParameters();
-        parameters.setCallbackID(getCallbackID());
+
         if (msg.getFrom() == null || msg.getFrom().getCallbackEndpoint() == null) {
             return;
         }
 
+        ReferenceParameters parameters = msg.getFrom().getReferenceParameters();
+        parameters.setCallbackID(getCallbackID());
         parameters.setCallbackReference(msg.getFrom().getCallbackEndpoint());
 
         // If we are passing out a callback target



Mime
View raw message