[jboss-cvs] JBoss Messaging SVN: r1481 - branches/Branch_HTTP_Experiment/src/main/org/jboss/jms/server/endpoint
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 17 03:39:07 EDT 2006
Author: ron_sigal
Date: 2006-10-17 03:39:06 -0400 (Tue, 17 Oct 2006)
New Revision: 1481
Modified:
branches/Branch_HTTP_Experiment/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
Log:
JBMESSAGING-207: Uses a ServerInvokerCallbackHandler instead of Client.
Modified: branches/Branch_HTTP_Experiment/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
===================================================================
--- branches/Branch_HTTP_Experiment/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java 2006-10-17 06:56:32 UTC (rev 1480)
+++ branches/Branch_HTTP_Experiment/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java 2006-10-17 07:39:06 UTC (rev 1481)
@@ -56,6 +56,7 @@
import org.jboss.messaging.core.tx.TransactionRepository;
import org.jboss.messaging.util.ConcurrentReaderHashSet;
import org.jboss.remoting.Client;
+import org.jboss.remoting.callback.ServerInvokerCallbackHandler;
import org.jboss.util.id.GUID;
import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
@@ -118,7 +119,7 @@
private MessageStore ms;
- private Client callbackClient;
+ private ServerInvokerCallbackHandler callbackHandler;
private byte usingVersion;
@@ -427,21 +428,30 @@
}
//IOC
- public void setCallbackClient(Client client)
+ public void setCallbackHandler(ServerInvokerCallbackHandler handler)
{
- callbackClient = client;
-
- // TODO not sure if this is the best way to do this, but the callbackClient needs to have
- // its "subsystem" set, otherwise remoting cannot find the associated
- // ServerInvocationHandler on the callback server
- callbackClient.setSubsystem(CallbackServerFactory.JMS_CALLBACK_SUBSYSTEM);
-
- // We explictly set the Marshaller since otherwise remoting tries to resolve the marshaller
- // every time which is very slow - see org.jboss.remoting.transport.socket.ProcessInvocation
- // This can make a massive difference on performance. We also do this in
- // JMSRemotingConnection.setupConnection
- callbackClient.setMarshaller(new JMSWireFormat());
- callbackClient.setUnMarshaller(new JMSWireFormat());
+ callbackHandler = handler;
+ Client callbackClient = callbackHandler.getCallbackClient();
+
+ if (callbackClient != null)
+ {
+ // TODO not sure if this is the best way to do this, but the callbackClient needs to have
+ // its "subsystem" set, otherwise remoting cannot find the associated
+ // ServerInvocationHandler on the callback server
+ callbackClient.setSubsystem(CallbackServerFactory.JMS_CALLBACK_SUBSYSTEM);
+
+ // We explictly set the Marshaller since otherwise remoting tries to resolve the marshaller
+ // every time which is very slow - see org.jboss.remoting.transport.socket.ProcessInvocation
+ // This can make a massive difference on performance. We also do this in
+ // JMSRemotingConnection.setupConnection
+
+ callbackClient.setMarshaller(new JMSWireFormat());
+ callbackClient.setUnMarshaller(new JMSWireFormat());
+ }
+ else
+ {
+ log.error("ServerInvokerCallbackHandler callback Client is not available");
+ }
}
// IOC
@@ -494,9 +504,9 @@
// Protected -----------------------------------------------------
- protected Client getCallbackClient()
+ protected ServerInvokerCallbackHandler getCallbackHandler()
{
- return callbackClient;
+ return callbackHandler;
}
protected int getConnectionID()
More information about the jboss-cvs-commits
mailing list