[jboss-cvs] JBoss Messaging SVN: r7303 - branches/Branch_1_4/src/main/org/jboss/jms/server/bridge.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jun 10 23:12:50 EDT 2009
Author: gaohoward
Date: 2009-06-10 23:12:50 -0400 (Wed, 10 Jun 2009)
New Revision: 7303
Modified:
branches/Branch_1_4/src/main/org/jboss/jms/server/bridge/Bridge.java
Log:
JBMESSAGING-1641
Modified: branches/Branch_1_4/src/main/org/jboss/jms/server/bridge/Bridge.java
===================================================================
--- branches/Branch_1_4/src/main/org/jboss/jms/server/bridge/Bridge.java 2009-06-11 02:25:13 UTC (rev 7302)
+++ branches/Branch_1_4/src/main/org/jboss/jms/server/bridge/Bridge.java 2009-06-11 03:12:50 UTC (rev 7303)
@@ -232,6 +232,8 @@
private int forwardMode;
+ private volatile boolean forceStop;
+
private static final int FORWARD_MODE_XA = 0;
private static final int FORWARD_MODE_LOCALTX = 1;
@@ -372,6 +374,8 @@
public synchronized void stop() throws Exception
{
+ forceStop = true;
+
if (!started)
{
log.warn(name + " Attempt to stop, but is already stopped");
@@ -1231,6 +1235,7 @@
while (true)
{
+ System.err.println("-----------retringllllllll");
boolean ok = setupJMSObjects();
if (ok)
@@ -1248,6 +1253,12 @@
log.warn(name + " Failed to set up connections, will retry after a pause of " + failureRetryInterval + " ms");
pause(failureRetryInterval);
+
+ if (forceStop)
+ {
+System.err.println("--------------------Stop!!");
+ break;
+ }
}
//If we get here then we exceed maxRetries
@@ -1444,7 +1455,9 @@
//from the call before the connections are reestablished so that the caller is not blocked unnecessarily.
Thread t = new Thread(failureHandler);
- t.start();
+ t.start();
+
+ t.interrupt();
}
private void addMessageIDInHeader(Message msg) throws Exception
More information about the jboss-cvs-commits
mailing list