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 Thu, 03 Sep 2015 11:36:25 GMT
2015-09-03 8:53 GMT+02:00 msdocware <ms@docware.de>:

> >> Now it works in Tomcat. I still need to test Websphere deployment
>
> What I did doesn't work in Websphere. When I had the resource-ref entries
> in
> web.xml, Websphere during deployment recognized them and offered to map
> them
> to the available resources. My understanding was that this would work also
> with annotations, probably by some byte code analyse. But this didn't
> happen
> and thus I got errors when accessing the resources.
>
> > If it matches a tomee.xml resource id
>
> What I need is a way compatible with JEE, so that it works in different JEE
> servers. Something that works in Tomcat or TomEE is not enough for me.
>
>
There is no way to keep the definition portable in EE 6 (JMS 1.x) but the
code should stay the same. Dont mix definition of the resource and usage
(injection).


> In a previous reply there was the question whether my resource is managed
> or
> not. Actually I don't know. Above I described what I did in Tomcat and
> Websphere. Maybe "managed" is a thing what is available in true EAR apps.
> We
> have only WAR apps.
>
>
if your code is not managed then you'll get NO service from the container
so this is really the question you need to answer.

Let suppose your bean with injection is MyService, is this class a CDI bean
or an EJB or do you do a "new MyService()" or use spring to get an
instance. If not one of the first 2 answers then injections are not
intended to work (a bit like if you ask me to be at a meeting in 2h without
saying it to me ;)).


> More ideas?
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Using-JMS-with-Resource-annotation-tp4676042p4676073.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

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