[jboss-user] [Management, JMX/JBoss] - Mbean , need jndi "ConnectionFactory" when started, how to wr

tianfang do-not-reply at jboss.com
Sun Jun 1 21:26:17 EDT 2008


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



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154914#4154914

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154914



More information about the jboss-user mailing list