tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Gumbrecht <agumbre...@tomitribe.com>
Subject Re: Using JMS with Resource annotation
Date Wed, 02 Sep 2015 11:53:38 GMT
The area you marked as code, is that code in, for example @Singleton?

Andy.

http://www.tomitribe.com - @AndyGeeDe - On a small screen device.
On 2 Sep 2015 13:31, "Romain Manni-Bucau" <rmannibucau@gmail.com> wrote:

> Why not using tomee.xml?
>
> Ps: we still dont know if you class getting the injection is managed (is it
> a cdi bean or an ejb?)
> Le 2 sept. 2015 13:03, "msdocware" <ms@docware.de> a écrit :
>
> > This is the current situation
> > -----------------------------
> >
> > Code
> >
> >     InitialContext ctx = new javax.naming.InitialContext();
> >     factory = (ConnectionFactory) ctx.lookup("java:comp/env/jms/MyCF");
> >
> >
> > web.xml
> >
> >     <resource-ref>
> >         <description>Resource reference to JMS Factory</description>
> >         <res-ref-name>jms/MyCF</res-ref-name>
> >         <res-type>javax.jms.ConnectionFactory</res-type>
> >         <res-auth>Container</res-auth>
> >         <res-sharing-scope>Shareable</res-sharing-scope>
> >     </resource-ref>
> >
> >
> > Tomcat context.xml
> >
> > <Resource name="jms/MyCF" auth="Container"
> > type="org.apache.activemq.ActiveMQConnectionFactory" description="JMS
> > Connection Factory"
> >         factory="org.apache.activemq.jndi.JNDIReferenceFactory"
> > brokerURL="tcp://localhost:61616" brokerName="RemoteActiveMQBroker"/>
> >
> >
> > This is what I am trying
> > ------------------------
> >
> > Code
> >
> >     @Resource(name = "jms/MyCF")
> >     private ConnectionFactory factory;
> >
> > web.xml: no JMS related entries
> >
> > Tomcat context.xml: see above
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/Using-JMS-with-Resource-annotation-tp4676042p4676056.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message