0 Replies Latest reply on Jun 1, 2008 9:26 PM by tian fang

    Mbean ,need jndi "ConnectionFactory" when started, how to wr

    tian fang Newbie

      I write a MBean also want to be a PTP message consumer(like MDB).

      I found HAJMSClient in Jboss src, the function just like want i need. after I hot deploy,it runs correctly, but when I deployed before jbossAS started, it can not work.

      // Object tmp = iniCtx.lookup("java:comp/env/jms/QCF");
      Object tmp = iniCtx.lookup("ConnectionFactory");
      QueueConnectionFactory qcf = (QueueConnectionFactory)tmp;


      code is : Object tmp = iniCtx.lookup("ConnectionFactory");
      error is:
      Reason: javax.naming.NameNotFoundException: ConnectionFactory not
      bound

      code is: Object tmp = iniCtx.lookup("java:comp/env/jms/QCF");
      error is:
      Reason: javax.naming.NameNotFoundException: env not bound

      how can I wirte depends in jboss-service.xml