Hi all,
I have a problem getting the Context.lookup() method to return the actual object bound in JNDI (which is a org.activemq.ra.ActiveMQConnectionFactory).
Instead I get a javax.naming.Reference object.
As far as I understand, the Reference object should only be returned if the lookup is executed inside the same VM where the JNDI provider is deployed. However the lookup is actually done outside the JBoss VM, so I was expecting the ConnectionFactory itself to be returned.
(Pls. note that the process looking up the factory has only classes from jboss/client and activemq in the classpath).
The environment:
ActiveMQ 3.1 deployed on JBoss 4.0.1 using JCA.
Deployment of Factory in activemq-jms-ds.xml:
<connection-factories> <tx-connection-factory> <jndi-name>activemq/QueueConnectionFactory</jndi-name> <use-java-context>false</use-java-context> <xa-transaction/> <track-connection-by-tx/> <rar-name>activemq.rar</rar-name> <connection-definition> javax.jms.QueueConnectionFactory </connection-definition> <security-domain-and-application> JmsXARealm </security-domain-and-application> </tx-connection-factory> </connection-factories>