@Romain

- Do I not need to use @Inject for EJB if I need to use CDI Interceptors on
the EJB?
- 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?

Regards
LF

On Fri, Oct 3, 2014 at 5:58 PM, Romain Manni-Bucau <[email protected]>
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 <[email protected]>:
> > 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 <[email protected]> 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 [email protected], and destroy all copies of this
message and any attachments.

Reply via email to