Hello all,
My mbean calls class that connects to JMS.
But, in that class ConnectionFactory can not be bound.
I don't have any EJB (MDB) no EAR just SAR.
How I can define and where that my mbean can get context of JMS factory?
in my code:
// Get the initial context
Context context = new InitialContext();
// Get the connection factory
TopicConnectionFactory topicFactory =
(TopicConnectionFactory)context.lookup("ConnectionFactory");
in jboss-services.xml:
<resource-ref>
<res-ref-name>jms/TCF</res-ref-name>
<jndi-name>ConnectionFactory</jndi-name>
<res-type>javax.jms.TopicConnectionFactory</res-type>
</resource-ref>
MyServer
jboss.mq.destination:service=Topic,name=MyTopic
....
My mbean doesn't see that ConnectionFactory :-(
In case of EJB there is jboss.xml where I can define that jndi mapping, but I can't find any info about how to use jboss.xml with SAR.
Thanks for your help.