[jboss-cvs] JBoss Messaging SVN: r3449 - in branches/Branch_Stable/src/main/org/jboss/jms/server: endpoint and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Dec 9 09:38:18 EST 2007


Author: timfox
Date: 2007-12-09 09:38:13 -0500 (Sun, 09 Dec 2007)
New Revision: 3449

Modified:
   branches/Branch_Stable/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java
   branches/Branch_Stable/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
Log:
http://jira.jboss.org/jira/browse/JBREM-845


Modified: branches/Branch_Stable/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java
===================================================================
--- branches/Branch_Stable/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java	2007-12-07 15:05:26 UTC (rev 3448)
+++ branches/Branch_Stable/src/main/org/jboss/jms/server/connectionmanager/SimpleConnectionManager.java	2007-12-09 14:38:13 UTC (rev 3449)
@@ -35,6 +35,7 @@
 
 import org.jboss.jms.delegate.ConnectionEndpoint;
 import org.jboss.jms.server.ConnectionManager;
+import org.jboss.jms.server.endpoint.ServerConnectionEndpoint;
 import org.jboss.logging.Logger;
 import org.jboss.messaging.core.contract.ClusterNotification;
 import org.jboss.messaging.core.contract.ClusterNotificationListener;
@@ -364,6 +365,10 @@
             try
             {
       			log.debug("clPearing up state for connection " + sce);
+      			
+      			//Remoting is dumb and doesn't clean up it's state after itself - so we have to do it.
+      			((ServerConnectionEndpoint)sce).closeCallbackClient();
+      			
                sce.closing(-1);
                sce.close();
                log.debug("cleared up state for connection " + sce);

Modified: branches/Branch_Stable/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java
===================================================================
--- branches/Branch_Stable/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java	2007-12-07 15:05:26 UTC (rev 3448)
+++ branches/Branch_Stable/src/main/org/jboss/jms/server/endpoint/ServerConnectionEndpoint.java	2007-12-09 14:38:13 UTC (rev 3449)
@@ -434,11 +434,26 @@
    }
    
    public long closing(long sequence) throws JMSException
-   {
+   {                  
       log.trace(this + " closing (noop)");    
       
       return -1;
    }
+   
+   public void closeCallbackClient()
+   {
+      try
+      {
+         callbackHandler.getCallbackClient().disconnect();
+      }
+      catch (Throwable t)
+      {
+         if (trace)
+         {
+            log.trace("Failed to diconnect callback client", t);
+         }
+      }
+   }
 
    public void sendTransaction(TransactionRequest request,
                                boolean checkForDuplicates) throws JMSException




More information about the jboss-cvs-commits mailing list