[jboss-cvs] JBoss Messaging SVN: r2093 - trunk/src/main/org/jboss/jms/server/endpoint.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jan 29 09:40:50 EST 2007


Author: timfox
Date: 2007-01-29 09:40:50 -0500 (Mon, 29 Jan 2007)
New Revision: 2093

Modified:
   trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
Log:
Another tweak for http://jira.jboss.com/jira/browse/JBMESSAGING-789



Modified: trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java	2007-01-29 14:32:29 UTC (rev 2092)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java	2007-01-29 14:40:50 UTC (rev 2093)
@@ -29,11 +29,11 @@
 import org.jboss.jms.message.JBossMessage;
 import org.jboss.jms.message.MessageProxy;
 import org.jboss.jms.selector.Selector;
+import org.jboss.jms.server.ConnectionManager;
 import org.jboss.jms.server.destination.TopicService;
 import org.jboss.jms.server.messagecounter.MessageCounter;
 import org.jboss.jms.server.remoting.JMSDispatcher;
 import org.jboss.jms.server.remoting.MessagingMarshallable;
-import org.jboss.jms.server.ConnectionManager;
 import org.jboss.jms.util.ExceptionUtil;
 import org.jboss.logging.Logger;
 import org.jboss.messaging.core.Channel;
@@ -47,6 +47,7 @@
 import org.jboss.messaging.core.plugin.contract.PostOffice;
 import org.jboss.messaging.core.plugin.postoffice.Binding;
 import org.jboss.messaging.core.tx.Transaction;
+import org.jboss.remoting.Invoker;
 import org.jboss.remoting.callback.Callback;
 import org.jboss.remoting.callback.HandleCallbackException;
 import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
@@ -248,15 +249,18 @@
             // one way invocation, no acknowledgment sent back by the client
             if (trace) { log.trace(this + " submitting message " + message + " to the remoting layer to be sent asynchronously"); }
             
-            //FIXME - due a design flaw in the socket based transports, they use a pool of TCP
+            //FIXME - due a design (flaw??) in the socket based transports, they use a pool of TCP
             //connections, so subsequent invocations can end up using different underlying connections
             //meaning that later invocations can overtake earlier invocations, if there are more than
             //one user concurrently invoking on the same transport            
             //We need someway of pinning the client object to the underlying invocation            
             //For now we just serialize all access so that only the first connection in the pool
-            //is ever used - bit this is far from ideal!!!
+            //is ever used - bit this is far from ideal!!!            
+            //See http://jira.jboss.com/jira/browse/JBMESSAGING-789
             
-            synchronized (Object.class)
+            Invoker invoker = callbackHandler.getCallbackClient().getInvoker();
+            
+            synchronized (invoker)
             {            
                callbackHandler.handleCallbackOneway(callback);
             }




More information about the jboss-cvs-commits mailing list