[jboss-cvs] JBoss Messaging SVN: r2394 - trunk/src/main/org/jboss/jms/server/bridge.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 22 09:00:40 EST 2007
Author: timfox
Date: 2007-02-22 09:00:40 -0500 (Thu, 22 Feb 2007)
New Revision: 2394
Modified:
trunk/src/main/org/jboss/jms/server/bridge/Bridge.java
Log:
http://jira.jboss.org/jira/browse/JBMESSAGING-858
Modified: trunk/src/main/org/jboss/jms/server/bridge/Bridge.java
===================================================================
--- trunk/src/main/org/jboss/jms/server/bridge/Bridge.java 2007-02-21 23:52:55 UTC (rev 2393)
+++ trunk/src/main/org/jboss/jms/server/bridge/Bridge.java 2007-02-22 14:00:40 UTC (rev 2394)
@@ -27,6 +27,7 @@
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
+import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
@@ -295,6 +296,10 @@
if (ok)
{
+ //start the source connection
+
+ sourceConn.start();
+
started = true;
if (maxBatchTime != -1)
@@ -1022,8 +1027,6 @@
consumer.setMessageListener(new SourceListener());
- sourceConn.start();
-
return true;
}
catch (Exception e)
@@ -1255,7 +1258,7 @@
if (maxRetries > 0 || maxRetries == -1)
{
- log.warn( "Will retry after a pause of " + failureRetryInterval);
+ log.warn("Will retry after a pause of " + failureRetryInterval);
pause(failureRetryInterval);
@@ -1283,6 +1286,18 @@
synchronized (lock)
{
failed = false;
+
+ //Start the source connection - note the source connection must not be started before
+ //otherwise messages will be received and ignored
+
+ try
+ {
+ sourceConn.start();
+ }
+ catch (JMSException e)
+ {
+ log.error("Failed to start source connection", e);
+ }
}
}
}
More information about the jboss-cvs-commits
mailing list