[
https://jira.jboss.org/jira/browse/JBMESSAGING-999?page=com.atlassian.jir...
]
Markus Lutum commented on JBMESSAGING-999:
------------------------------------------
Howard, that is exactly what I mean!
An Tim! You fixed it...in SP1.
If you take a look at the history of the BridgeService of the SP1 Tag
https://svn.jboss.org/repos/messaging/tags/JBossMessaging_1_4_0_SP1/src/m...
you checked in the solution on 10/12/2007 Revision 3188 with a reference to this BUG in
the comment.
At the bottom there are the changes.
Instead of lookup the destinations you set the factory to the Bridge which then does the
lookup itself.
Of course some other files were changed too like Bridge.class.
By the way: Tim, I thought you are on vacation :-) Congratulations from my side ....
Index: BridgeService.java
===================================================================
--- BridgeService.java (revision 3187)
+++ BridgeService.java (revision 3188)
@@ -23,10 +23,7 @@
import java.util.Properties;
-import javax.jms.Destination;
import javax.management.ObjectName;
-import javax.naming.Context;
-import javax.naming.InitialContext;
import org.jboss.messaging.core.contract.MessagingComponent;
import org.jboss.system.ServiceMBeanSupport;
@@ -316,14 +313,6 @@
Properties targetProps = (Properties)server.getAttribute(targetProviderLoader,
"Properties");
- Context icSource = new InitialContext(sourceProps);
-
- Context icTarget = new InitialContext(targetProps);
-
- Destination sourceDest = (Destination)icSource.lookup(sourceDestinationLookup);
-
- Destination targetDest = (Destination)icTarget.lookup(targetDestinationLookup);
-
String sourceCFRef = (String)server.getAttribute(sourceProviderLoader,
"FactoryRef");
String targetCFRef = (String)server.getAttribute(targetProviderLoader,
"FactoryRef");
@@ -342,10 +331,6 @@
destCff= new JNDIConnectionFactoryFactory(targetProps, targetCFRef);
}
- bridge.setSourceDestination(sourceDest);
-
- bridge.setTargetDestination(targetDest);
-
bridge.setSourceConnectionFactoryFactory(sourceCff);
bridge.setDestConnectionFactoryFactory(destCff);
@@ -350,6 +335,14 @@
bridge.setDestConnectionFactoryFactory(destCff);
+ DestinationFactory sourceDestinationFactory = new
JNDIDestinationFactory(sourceProps, sourceDestinationLookup);
+
+ DestinationFactory targetDestinationFactory = new
JNDIDestinationFactory(targetProps, targetDestinationLookup);
+
+ bridge.setSourceDestinationFactory(sourceDestinationFactory);
+
+ bridge.setTargetDestinationFactory(targetDestinationFactory);
+
bridge.start();
log.info("Started bridge " + this.getName() + ". Source: " +
sourceDestinationLookup + " Target: " + targetDestinationLookup);
Bridge startup should retry if remote destinations are not available
--------------------------------------------------------------------
Key: JBMESSAGING-999
URL:
https://jira.jboss.org/jira/browse/JBMESSAGING-999
Project: JBoss Messaging
Issue Type: Task
Affects Versions: 1.4.0.GA
Reporter: Tim Fox
Assignee: Howard Gao
Priority: Minor
Fix For: 1.4.0.SP3.CP05, 1.4.2.GA
Currently the bridge only retries connection creation after startup.
If remote provider is not available at startup it will fail to start.
We should change this by institutiing a retry at startup too.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira