I was spending a lot time to sort out problem with JBoss 6.1.0 to inject JMS connection factory in my session bean. I am using JBoss 6.1.0 with default profile and running it in debian.
Snip of my code are:
@Resource(name="java:/QueueConnectionFactory")
private QueueConnectionFactory factory
There is in jboss6/server/default/deploy/hornetq/hornetq-jms.xml:
<connection-factory name="QueueConnectionFactory" signature="queue">
<xa>true</xa>
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:/QueueConnectionFactory"/>
</entries>
</connection-factory>
While deploying my ear-file I am getting this error:
Neither any mapped-name/lookup/jndi-name specified nor any ResourceProvider could process resource-ref named env/java:/QueueConnectionFactory of type javax.jms.QueueConnectionFactory
It can't inject queue connection factory in my session bean despite of the queue factory being visible in the admin console.