users@glassfish.java.net

Re: _at_Webservice and JMS _at_Resource

From: <glassfish_at_javadesktop.org>
Date: Wed, 26 Sep 2007 00:10:22 PDT

Yes I have, I just switched the code over to using JNDI and it works fine.

     InitialContext initContext = new InitialContext();
      ConnectionFactory connFactory =
        (ConnectionFactory) initContext.lookup("jms/ConnectionFactory");

      if (connFactory == null) {
        System.out.println("ConnectionFactory is null");
      }

      Queue queue = (Queue) initContext.lookup("jms/Queue");
      if (queue == null) {
        System.out.println("Queue is null");
      }

These are both fine and work as expected.

Thanks,
Mark
[Message sent by forum member 'markshure' (markshure)]

http://forums.java.net/jive/thread.jspa?messageID=237084