tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: Using JMS with Resource annotation
Date Tue, 01 Sep 2015 15:51:20 GMT
Hi

is the bean with the @Resource managed - or do you instantiate it yourself?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-09-01 17:10 GMT+02:00 Michael Südkamp <Michael.Suedkamp@docware.de>:

> Hello,
>
> We are using JMS with Tomcat/ActiveMQ as well with IBM Websphere/IBM MQ.
> We have resource-ref entries in our web.xml which are referencing the JMS
> resources configured in the container.
>
> Now we would like to get rid of the web.xml resource-ref entries. In my
> understanding they can be replaced by @Resource annotations as described
> here: http://tomee.apache.org/tomcat-jms.html
>
> But whether I use the @Resource annotation for the ConnectionFactory
> without name attribute as in your example or whether I specify the name
> configured in the container, I always get a NullPointerException when using
> the factory instance, i.e. the factory doesn't get injected.
>
> What am I missing here?
>
> mit freundlichen Grüßen
> with kind regards
>
> Michael Südkamp
> Docware GmbH
>
>

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