Hi!
I'm trying to understand how I can use @Inject to inject EJBs.
1. If I want to inject an EJB that is packaged in the WAR together with the
code trying to inject it i assume I can use @Inject, correct?
2. As 1 but the EJB is packaged in a separate ejb-jar. I assume I can still
use @Inject corr
Well I don't know exactly how EJB and CDI is managed internally by TomEE.
But using @Inject whatever the class is will mean that the lifecycle of
that instance will be managed by CDI container. On the other side if you
use @EJB the bean will be managed by EJB container, and this means EJB
lifecycle
Hi,
I am not sure about that Alex. I use @Inject only and Stateless and stuff is
working fine
Skickat från min iPhone
> 3 okt 2014 kl. 15:30 skrev Alex Soto :
>
> Well I don't know exactly how EJB and CDI is managed internally by TomEE.
> But using @Inject whatever the class is will mean that
Basic rule these days is @inject local and use @EJB for remote beans. If in
doubt use @EJB. That gives you all transactional state guaranteed.
Andy
On 3 Oct 2014 06:31, "Alex Soto" wrote:
> Well I don't know exactly how EJB and CDI is managed internally by TomEE.
> But using @Inject whatever the
Yes, I remember when I became TomEE user, I think Romain advised me that I
can use @Inject or @EJB. I decided to only use @EJB for EJBs and @Inject
for @SessionScoped, @ApplicationScoped, @RequestScoped beans.
On Fri, Oct 3, 2014 at 10:49 AM, wrote:
> Hi,
> I am not sure about that Alex. I use
That's right Howard. It's kind of a TomEE feature though. So what I blurted
above is the safe bet. Anything you can 'get' local @inject, inter-app or
inter-machine use @EJB
Andy.
http://www.tomitribe.com - @AndyGeeDe - On a mobile device, and I have fat
fingers. Sorry for typos.
On 3 Oct 2014 07:
...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.
-
> 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
> 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
pecific your
> > are tight to TomEE and won t be able to run on wildfly fir example
> >
> > El divendres, 3 octubre de 2014, hwaastad va
> escriure:
> >
> >> ...or use @inject all over and produce your remotes :-)
> >>
> >> br hw
> >>
>
hwaastad va
> escriure:
> >
> >> ...or use @inject all over and produce your remotes :-)
> >>
> >> br hw
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://tomee-openejb.979440.n4.n
T+02:00 Alex Soto :
>> > 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 va
>> escriure:
>> >
>
run on wildfly fir example
> >> >
> >> > El divendres, 3 octubre de 2014, hwaastad va
> >> escriure:
> >> >
> >> >> ...or use @inject all over and produce your remotes :-)
> >> >>
> >> >> br hw
> &
t 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 va
>> >> escriure:
>>
14 matches
Mail list logo