for all intents and purposes, as long as you're using @Local/@LocalBean
@Inject should work the exact same as @EJB, regardless of
SLSB/SFSB/Singleton.  Obviously if you're in a Bean Archive you'll want to
give your SFSB a scope so that the containers work with it properly but
last time I tried this (e.g. @SessionScoped @Stateful) most containers did
random stuff.

On Fri, Oct 3, 2014 at 8:58 AM, 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
>

Reply via email to