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 <[email protected]>:

> 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
>
>

Reply via email to