[jboss-cvs] JBoss Messaging SVN: r2109 - trunk/src/main/org/jboss/jms/server/endpoint.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jan 30 04:48:49 EST 2007
Author: ovidiu.feodorov at jboss.com
Date: 2007-01-30 04:48:49 -0500 (Tue, 30 Jan 2007)
New Revision: 2109
Modified:
trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java
Log:
Kludge of a kludge: cannot always synchronize on clientInvoker, as callback client can be null ...
Needs to be reviewed 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-30 08:16:50 UTC (rev 2108)
+++ trunk/src/main/org/jboss/jms/server/endpoint/ServerConsumerEndpoint.java 2007-01-30 09:48:49 UTC (rev 2109)
@@ -48,6 +48,7 @@
import org.jboss.messaging.core.plugin.postoffice.Binding;
import org.jboss.messaging.core.tx.Transaction;
import org.jboss.remoting.Invoker;
+import org.jboss.remoting.Client;
import org.jboss.remoting.callback.Callback;
import org.jboss.remoting.callback.HandleCallbackException;
import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
@@ -254,9 +255,22 @@
// all access so that only the first connection in the pool is ever used - bit this is
// far from ideal!!!
// See http://jira.jboss.com/jira/browse/JBMESSAGING-789
-
- Invoker invoker = callbackHandler.getCallbackClient().getInvoker();
-
+
+ Client clientInvoker = callbackHandler.getCallbackClient();
+ Object invoker = null;
+
+ if (clientInvoker != null)
+ {
+ invoker = clientInvoker.getInvoker();
+ }
+ else
+ {
+ // TODO: dummy synchronization object, in case there's no clientInvoker. This will
+ // happen during the first invocation anyway. It's a kludge, I know, but this whole
+ // synchronization thing is a huge kludge. Needs to be reviewed.
+ invoker = new Object();
+ }
+
synchronized (invoker)
{
// one way invocation, no acknowledgment sent back by the client
More information about the jboss-cvs-commits
mailing list