0 Replies Latest reply on Nov 10, 2004 11:47 AM by mhemling

    Queue Connection problem jboss 3.2.5

    mhemling

      What is the correct way to look up a LOCAL jboss server? What is the correct way to look up a REMOTE jboss server?

      This is for Redhat ES 3
      jdk 1.4.2._05

      My code:

      try
      {
      Hashtable env = new Hashtable();
      env.put(Context.PROVIDER_URL, "jnp://" + queueHost + ":" + queuePort);
      env.put(Context.InitialContextFactory,"org.jnp.interfaces.NamingContextFactory");
      queueConnectionFactory = (QueueConnectionFactory)jndiContext.lookup("UIL2ConnectionFactory");

      queue = (Queue)jndiContext.lookup("queue/QueueX");
      }
      catch (JMSException je)
      {}
      catch(Exception e)
      {}


      I also implement the exception listener that will detect a broken connection. The problem is that ALL of the onException methods are being called for ALL connections when only one of the connections is broken. If I have a queue receiver connected to a local jboss and a queue receiver connected to a remote jboss and I then break the connection to the remote jboss, BOTH onException methods are called. Even the one for the LOCAL connection. How can that be? There is an issue with the client side jboss code. The code also hangs on the queueConnection.close() method that I call in the onException() method before I try to reconnect.


      This has been an ongoing problem for some time now. I have scoured the forum and have seen similar problems but never a good answer. Any help would be appreciated.