All, I have a ConnectionFactory, some Queues and Topics that i would like to be made available in openejb for unit testing purposes, however our system uses the jndi names jms/MyFactory, but when i configure MyFactory in my ejb-jar.xml it gets a jndi jame of java:comp/env/jms/MyFactory. My understanding was that when i configure a jndi resource in a JavaEE environment i get two JNDI names one that i configure, and one prefixed with java:comp/env. I would settle for just getting the non java:comp/env/ name. Below is my ejb-jar.xml, any help would be appreciated. Thanks
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0"> <enterprise-beans> <!-- Configure the message driven bean that will listen to the RouterEventsQueue queue --> <message-driven> <ejb-name>DispatcherBean</ejb-name> <ejb-class>com.acision.router.DispatcherBean</ejb-class> <messaging-type>javax.jms.MessageListener</messaging-type> <transaction-type>Container</transaction-type> <message-destination-type>javax.jms.Queue</message-destination-type> <message-destination-link>RouterEventsQueue</message-destination-link> <!-- Allow the connection factory to be looked up via java:comp/env/SimpleRouterConnectionFactory --> <resource-ref> <res-ref-name>RouterConnectionFactory</res-ref-name> <res-type>javax.jms.ConnectionFactory</res-type> </resource-ref> <!-- Allow the reply queue to looked up via java:comp/env/TestingQueue --> <resource-ref> <res-ref-name>TestingTopic</res-ref-name> <res-type>javax.jms.Topic</res-type> </resource-ref> <!-- Allow the dead queue to looked up via java:comp/env/DeadEventsQueue --> <resource-ref> <res-ref-name>DeadEventsQueue</res-ref-name> <res-type>javax.jms.Queue</res-type> </resource-ref> </message-driven> <!-- Configure the session bean that will be sending message to the DispatcherBean queue, and listening for the answer --> <session> <ejb-name>PutterBean</ejb-name> <business-local>com.acision.router.tools.PutterLocal</business-local> <ejb-class>com.acision.router.tools.PutterBean</ejb-class> <transaction-type>Container</transaction-type> <!-- Allow the connection factory to looked up via java:comp/env/SimpleRouterConnectionFactory --> <resource-ref> <res-ref-name>RouterConnectionFactory</res-ref-name> <res-type>javax.jms.ConnectionFactory</res-type> </resource-ref> <!-- Allow the reply queue to looked up via java:comp/env/TestingTopic --> <resource-ref> <res-ref-name>TestingTopic</res-ref-name> <res-type>javax.jms.Topic</res-type> </resource-ref> <!-- Allow the reply queue to looked up via java:comp/env/DeadEventsQueue --> <resource-ref> <res-ref-name>DeadEventsQueue</res-ref-name> <res-type>javax.jms.Queue</res-type> </resource-ref> <!-- Allow the destination queue to looked up via java:comp/env/RouterEventsQueue --> <resource-ref> <res-ref-name>jms/RouterEventsQueue</res-ref-name> <res-type>javax.jms.Queue</res-type> </resource-ref> </session> </enterprise-beans> <!-- define the JMS queues that we need --> <assembly-descriptor> <message-destination> <message-destination-name>RouterEventsQueue</message-destination-name> </message-destination> <message-destination> <message-destination-name>DeadEventsQueue</message-destination-name> </message-destination> <message-destination> <message-destination-name>TestingTopic</message-destination-name> </message-destination> </assembly-descriptor> </ejb-jar> -- View this message in context: http://www.nabble.com/Setting-alternate-jndi-prefix--%28not-java%3Acomp-env%29-tp23428206p23428206.html Sent from the OpenEJB User mailing list archive at Nabble.com.
