tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r830700 - in /tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core: context/CallableReferenceImpl.java invocation/JDKCallbackInvocationHandler.java invocation/JDKInvocationHandler.java
Date Wed, 28 Oct 2009 17:50:14 GMT
Author: rfeng
Date: Wed Oct 28 17:50:13 2009
New Revision: 830700

URL: http://svn.apache.org/viewvc?rev=830700&view=rev
Log:
Fix for TUSCANY-3348 (perf improvement)

Modified:
    tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/context/CallableReferenceImpl.java
    tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKCallbackInvocationHandler.java
    tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java

Modified: tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/context/CallableReferenceImpl.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/context/CallableReferenceImpl.java?rev=830700&r1=830699&r2=830700&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/context/CallableReferenceImpl.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/context/CallableReferenceImpl.java
Wed Oct 28 17:50:13 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.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKCallbackInvocationHandler.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKCallbackInvocationHandler.java?rev=830700&r1=830699&r2=830700&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKCallbackInvocationHandler.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKCallbackInvocationHandler.java
Wed Oct 28 17:50:13 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.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java?rev=830700&r1=830699&r2=830700&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java
(original)
+++ tuscany/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/JDKInvocationHandler.java
Wed Oct 28 17:50:13 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