if (log.isTraceEnabled()) { log.trace("Created client"); }  InvokerLocator callbackServerLocator = new InvokerLocator(callbackServerURI);  if (log.isTraceEnabled()) { log.trace("Starting callback server with uri:" + callbackServerLocator.getLocatorURI()); }  callbackServer = new Connector();  callbackServer.setInvokerLocator(callbackServerLocator.getLocatorURI());  callbackServer.create();  callbackServer.start();  if (log.isTraceEnabled()) { log.trace("Created callback server"); }  client.connect();
if (client != null) { client.disconnect(); } if (callbackServer != null) {  try { callbackServer.stop();  callbackServer.destroy(); } catch (Exception ignore) {  } } if (count == MAX_RETRIES) { throw new JBossJMSException("Cannot start callbackserver after " + MAX_RETRIES + " retries", e); } } }
   public JMSRemotingConnection(String serverLocatorURI) throws Exception   {      id = new GUID().toString();            thisAddress = InetAddress.getLocalHost().getHostAddress();            bindPort = PortUtil.findFreePort("localhost");            serverLocator = new InvokerLocator(serverLocatorURI);            isMultiplex = serverLocator.getProtocol().equals("multiplex");                  if (log.isTraceEnabled()) { log.trace("Connecting with server URI:" + serverLocatorURI); }                  String callbackServerURI;            if (isMultiplex)      {         callbackServerURI = "multiplex://" + thisAddress +                              ":" + bindPort + "/?serverMultiplexId=" +                              id;              }      else      {         callbackServerURI = serverLocator.getProtocol() + "://" + thisAddress +                             ":" + bindPort;      }            client = new Client(serverLocator, getConfig());                  if (log.isTraceEnabled()) { log.trace("Created client"); }            InvokerLocator callbackServerLocator = new InvokerLocator(callbackServerURI);              if (log.isTraceEnabled()) { log.trace("Starting callback server with uri:"             + callbackServerLocator.getLocatorURI()); }                  callbackServer = new Connector();            callbackServer.setInvokerLocator(callbackServerLocator.getLocatorURI());            callbackServer.create();            callbackServer.start();            if (log.isTraceEnabled()) { log.trace("Created callback server"); }            client.connect();              }