[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Why are the destinations looked up twice? (jbm1.4)

gaohoward do-not-reply at jboss.com
Thu Dec 11 05:57:10 EST 2008


In Bridge.java, this code sets up the bridge stuff, at the beginning and after setting the QoS, the same source and target dests are looked up twice, any reason?

   private boolean setupJMSObjects()
   {
      try
      {  
      	//Lookup the destinations
      	sourceDestination = sourceDestinationFactory.createDestination();
      	
      	targetDestination = targetDestinationFactory.createDestination();
      	      
         if (sourceCff == targetCff)
         {
            //Source and target destinations are on the server - we can get once and only once
            //just using a local transacted session
         	//everything becomes once and only once
         	
         	forwardMode = FORWARD_MODE_LOCALTX;
         }
         else
         {
         	//Different servers
         	if (qualityOfServiceMode == QOS_ONCE_AND_ONLY_ONCE)
         	{
         		//Use XA
         		
         		forwardMode = FORWARD_MODE_XA;
         	}
         	else
         	{
         		forwardMode = FORWARD_MODE_NONTX;
         	}
         }
         
      	//Lookup the destinations
      	sourceDestination = sourceDestinationFactory.createDestination();
      	
      	targetDestination = targetDestinationFactory.createDestination();      	      
         
         sourceConn = createConnection(sourceUsername, sourcePassword, sourceCff);
......





View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195875#4195875

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4195875



More information about the jboss-dev-forums mailing list