Did you try name instead of mappedName. MappedName is not portable
Le 20 nov. 2013 22:22, "mark-s" <msil...@gmail.com> a écrit :

> I am seeing similar logging as above, but not openejb/Resource:
>
> Nov 20, 2013 8:55:38 PM org.apache.openejb.config.AutoConfig
> processResourceRef
> INFO: Auto-linking resource-ref
> 'java:comp/env/uk.co.mns.mdb.MessagePoster/connectionFactory' in bean
> TestSingleton to Resource(id=MyJmsConnectionFactory)
> Nov 20, 2013 8:55:38 PM org.apache.openejb.config.AutoConfig
> processResourceEnvRef
> INFO: Auto-linking resource-env-ref
> 'java:comp/env/uk.co.mns.mdb.MessagePoster/fooQueue' in bean TestSingleton
> to Resource(id=FooQueue)
> Nov 20, 2013 8:55:38 PM org.apache.openejb.config.AutoConfig
> processResourceEnvRef
> INFO: Auto-linking resource-env-ref
> 'java:comp/env/uk.co.mns.mdb.MessagePoster/barQueue' in bean TestSingleton
> to Resource(id=BarQueue)
>
> tomee.xml defines the resources
>
> <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
>         BrokerXmlConfig = broker:(tcp://localhost:61616)
>         ServerUrl = tcp://localhost:61616
> </Resource>
>
> <Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
>         ResourceAdapter = MyJmsResourceAdapter
> </Resource>
>
> <Container id="MyJmsMdbContainer" ctype="MESSAGE">
>         ResourceAdapter = MyJmsResourceAdapter
> </Container>
>
> <Resource id="FooQueue" type="javax.jms.Queue" />
> <Resource id="BarQueue" type="javax.jms.Queue" />
>
> And referenced by @Resource in a @Singleton that sends messages to the 2
> queues:
>
> @Resource
> private ConnectionFactory connectionFactory;
>
> @Resource(mappedName = "FooQueue")
> private Queue fooQueue;
>
> @Resource(mappedName = "BarQueue")
> private Queue barQueue;
>
> 2 Message driven beans annotated as:
> @MessageDriven(activationConfig = {
>         @ActivationConfigProperty(propertyName = "destinationType",
> propertyValue = "javax.jms.Queue"),
>         @ActivationConfigProperty(propertyName = "destination",
> propertyValue = "FooQueue"),
>         @ActivationConfigProperty(propertyName = "acknowledgeMode",
> propertyValue = "Auto-acknowledge") })
> public class FooMessageListener implements MessageListener {
>
> (Other listener only differs by name and destination)
>
> Where/what should be changed to stop this excess auto-linking (this is on
> Tomee 1.5.2+)?
>
> Not sure if I am being over verbose defining the queues in tomee.xml as
> well
> as through the @Resource annotation
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/JMS-Queues-auto-linking-to-beans-that-don-t-need-them-tp4665483p4666299.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Reply via email to