1 Reply Latest reply on Apr 28, 2006 2:35 PM by ravi veerla

    trouble looking up the queue name in a webservice using axis

    ravi veerla Newbie

      Hi all,

      I have succesfully created console applications which can write, read to queues and topics, but im trying to create a webservice with a similar logic. I am using axis on jboss, but when i perform the context.lookup method, it is not able to resolve the queue name, let me post the code snippet here to make it clear.

      Context ctx = new InitialContext();

      cf_callset = (QueueConnectionFactory)ctx.lookup("XAConnectionFactory");
      cf_resultset = (TopicConnectionFactory) ctx.lookup("XAConnectionFactory");

      m_callSetQueue = (Queue)ctx.lookup("CallSetQueue");

      m_resultSetTopic = (Topic)ctx.lookup("ResultSetTopic");

      ok now, looking at the code, if the JNDI look up failed it would have thrown exception saying that it couldnt find the XAConnectionFactory. but it throws the Exception when looking up CallSetQueue.

      Im not sure where the problem lies.

      any help will be greatly appreciated.

      Thanks

        • 1. Re: trouble looking up the queue name in a webservice using
          ravi veerla Newbie

          if this helps,

          i have checked the properties in the context in the webservice, and it printed out the following

          jnp.parsedName
          java.naming.provider.url --> localhost:1099
          java.naming.factory.initial --> org.jnp.interfaces.NamingContextFactory
          java.naming.factory.url.pkgs --> org
          .jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interfaces

          if you observe the property with key java.naming.factory.url.pkgs, it repeats itself twice. does this mess up something.