1 Reply Latest reply on Dec 3, 2006 8:07 PM by itty06

    Queue not bound

    itty06


      ejb-jar.xml
      
       <resource-env-ref>
       <description>administration object ref for outbound queue</description>
       <resource-env-ref-name>jms/ReplyQueue</resource-env-ref-name>
       <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
       </resource-env-ref>
      
      jboss.xml
      
       <resource-env-ref>
       <resource-env-ref-name>jms/ReplyQueue</resource-env-ref-name>
       <jndi-name>ABC</jndi-name>
       </resource-env-ref>
      


      I have integrated tibco with JBoss 4.
      When I try to lookup queue using resource-env-ref-name
      value I get error where it says queue ABC not bound.

      I have a queue ABC in tibco configured to have JNDI name of ABC as well.
      What JBoss is trying to do is locate ABC in its local JNDI.


       Properties prop = new Properties();
       prop.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.tibco.tibjms.naming.TibjmsInitialContextFactory");
       prop.setProperty(Context.PROVIDER_URL, "tcp://localhost:7222");
       Context ctx = new InitialContext(prop);
       ConnectionFactory factory = (ConnectionFactory) ctx.lookup("java:comp/env/jms/QCF");
       queue = (Destination) ctx.lookup("java:comp/env/jms/ReplyQueue");
      
      

      I get this error
      javax.naming.NamingException: Could not dereference object
      [Root exception is javax.naming.NameNotFoundException: ABC not bound]

      but if I change

      ctx.lookup("java:comp/env/jms/ReplyQueue");
      to
      ctx.lookup("ABC");
      I get a Destination object.

      Even changing
      Context ctx = new InitialContext(prop);
      to
      Context ctx = new InitialContext();
      doesn't give me any object.

      Any suggestion?


        • 1. Re: Queue not bound
          itty06

          Oops.

          My mistake... didn't do the relaying to EMS from JBoss ds file

          Just in case, someone is interested..


          tibjmsnaming://localhost/Ticket

          ABC


          Ticket is the queue in EMS, ABC is my JNDI name in Jboss.

          jms/replyQueue is the resource-env-ref-name which is accessed from java code using
          java:comp/env/jms/replyQueue