0 Replies Latest reply on Dec 11, 2008 5:57 AM by Yong Hao Gao

    Why are the destinations looked up twice? (jbm1.4)

    Yong Hao Gao Master

      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);
      ......