activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r637883 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Date Mon, 17 Mar 2008 13:34:18 GMT
Author: rajdavies
Date: Mon Mar 17 06:34:11 2008
New Revision: 637883

URL: http://svn.apache.org/viewvc?rev=637883&view=rev
Log:
don't want errors from old transport after its failed

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java?rev=637883&r1=637882&r2=637883&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/failover/FailoverTransport.java
Mon Mar 17 06:34:11 2008
@@ -42,6 +42,7 @@
 import org.apache.activemq.thread.Task;
 import org.apache.activemq.thread.TaskRunner;
 import org.apache.activemq.transport.CompositeTransport;
+import org.apache.activemq.transport.DefaultTransportListener;
 import org.apache.activemq.transport.FutureResponse;
 import org.apache.activemq.transport.ResponseCallback;
 import org.apache.activemq.transport.Transport;
@@ -97,6 +98,7 @@
     private int backupPoolSize=1;
     private boolean trackMessages = false;
     private int maxCacheSize = 128 * 1024;
+    private TransportListener disposedListener = new DefaultTransportListener();
     
 
     private final TransportListener myTransportListener = createTransportListener();
@@ -214,6 +216,11 @@
                 wasConnected=true;
                 initialized = false;
                 failedConnectTransportURI=connectedTransportURI;
+                Transport old = connectedTransport.get();
+                if(old != null) {
+                    //don't want errors from old transport
+                    old.setTransportListener(disposedListener);
+                }
                 connectedTransport.set(null);
                 connectedTransportURI = null;
                 connected=false;



Mime
View raw message