tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msdocware ...@docware.de>
Subject Re: Using JMS with Resource annotation
Date Wed, 02 Sep 2015 06:34:33 GMT
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
View raw message