-
1. QueueConnectionFactory problem in JBoss-5.1.0.GA
mp911de May 23, 2011 3:10 PM (in response to hmusavi)Hi there,
the JNDI-View shows your registered EJB structure. By default, the JBoss 5 Connection Factories have following mappings:
<binding>/ConnectionFactory</binding>
<binding>/XAConnectionFactory</binding>
<binding>java:/ConnectionFactory</binding>
<binding>java:/XAConnectionFactory</binding>
(see connection-factories-service.xml)
so
@Resource(mappedName="/ConnectionFactory")
private ConnectionFactory connectionFactory;
should work.
Best regards,
Mark
-
2. Re: QueueConnectionFactory problem in JBoss-5.1.0.GA
hmusavi May 23, 2011 3:25 PM (in response to mp911de)Hi Mark,
Thank you for your reply. I did try your suggestion as well but it still would not work. I was not getting any error but it seems that the message was not being delivered. The onMessage() method of my MDB was never being called. The only way I could get it to work was to add the following to connection-factories-service.xml.
<mbean code="org.jboss.naming.LinkRefPairService" name="jboss.jms:alias=QueueConnectionFactory"> <attribute name="JndiName">QueueConnectionFactory</attribute> <attribute name="RemoteJndiName">ConnectionFactory</attribute> <attribute name="LocalJndiName">java:/JmsXA</attribute> <depends>jboss:service=Naming</depends> </mbean>
Thanks,
Hamid