Add prefix openejb:Resource/ or java:openejb/Resource/ to id value for spring lookup
Le 22 juil. 2016 12:19, "sureshshine" <sureshselvamj...@gmail.com> a écrit : > Thanks much for your reply. > > I need one more clarification and added a jndi resource in tomee.xml as > follows, > > <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter"> > BrokerXmlConfig = xbean:file:/conf/activemq.xml > ServerUrl = tcp://localhost:61616 > </Resource> > > <Resource id="jms/ConnectionFactory" type="javax.jms.ConnectionFactory"> > connectionMaxIdleTime = 15 Minutes > connectionMaxWaitTime = 5 seconds > poolMaxSize = 10 > poolMinSize = 0 > resourceAdapter = MyJmsResourceAdapter > transactionSupport = xa > </Resource> > > I am able to see the resource id "jms/ConnectionFactory" in tomee+ catalina > log. I tried to get that instance in my application context file as > follows, > but instance (connectionFactory) was null. > > <jee:jndi-lookup id="connectionFactory" jndi-name="jms/ConnectionFactory" > lookup-on-startup="false" proxy-interface="javax.jms.ConnectionFactory"/> > > private ConnectionFactory connectionFactory; > > Also added the following configuration in tomee+ web.xml and context.xml > and > tried , but i am unable to get that instance ( > connectionFactory) > > resource-ref> > <description>JMS JNDI Connection</description> > <res-ref-name>jms/ConnectionFactory</res-ref-name> > <res-type>javax.jms.ConnectionFactory</res-type> > <res-auth>Container</res-auth> > </resource-ref> > > Please let me know what's needs to be done to get the connectionFactory > instance in my application. > > Thanks > > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Tomme-and-JMS-with-JNDI-configuration-tp4679415p4679454.html > Sent from the TomEE Dev mailing list archive at Nabble.com. >