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: Regarding @Inject vs @EJB for EJB
Date Mon, 06 Oct 2014 07:02:09 GMT
2014-10-06 8:38 GMT+02:00 Lars-Fredrik Smedberg <itsmeden@gmail.com>:
> @Romain
>
> - Do I not need to use @Inject for EJB if I need to use CDI Interceptors on
> the EJB?

no

> - When I use @Inject where can the EJB I try to inject be packaged? Same
> WAR, EJB-JAR inside same EAR, other WAR in same EAR, other EAR?
>

same as classloader rules in theory.

> Regards
> LF
>
> On Fri, Oct 3, 2014 at 5:58 PM, Romain Manni-Bucau <rmannibucau@gmail.com>
> wrote:
>
>> Well rule is simple: for @Stateless/@Singleton if CDI is enabled
>> (beans.xml) @Inject = @EJB. For @Stateful @Inject only makes sense
>> with a normal scope and here cdi handles the stateful lifecycle (no
>> need to call @Remove).
>>
>> @EJB doesn't for for remote ejb excepted using TomEE specific feature
>> like JndiProvider (often you use a @Produces externalizing the jndi
>> properties).
>>
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>> 2014-10-03 17:19 GMT+02:00 Alex Soto <asotobu@gmail.com>:
>> > It is never late to know sth new. But then if this is TomEE specific your
>> > are tight to TomEE and won t be able to run on wildfly fir example
>> >
>> > El divendres, 3 octubre de 2014, hwaastad <helge@waastad.org> va
>> escriure:
>> >
>> >> ...or use @inject all over and produce your remotes :-)
>> >>
>> >> br hw
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://tomee-openejb.979440.n4.nabble.com/Regarding-Inject-vs-EJB-for-EJB-tp4672108p4672117.html
>> >> Sent from the TomEE Users mailing list archive at Nabble.com.
>> >>
>> >
>> >
>> > --
>> > Enviat amb Gmail Mobile
>>
>
>
>
> --
> Med vänlig hälsning / Best regards
>
> Lars-Fredrik Smedberg
>
> STATEMENT OF CONFIDENTIALITY:
> The information contained in this electronic message and any
> attachments to this message are intended for the exclusive use of the
> address(es) and may contain confidential or privileged information. If
> you are not the intended recipient, please notify Lars-Fredrik Smedberg
> immediately at itsmeden@gmail.com, and destroy all copies of this
> message and any attachments.

Mime
View raw message