Re: Regarding @Inject vs @EJB for EJB

2014-10-06 Thread Romain Manni-Bucau
fir example El divendres, 3 octubre de 2014, hwaastad he...@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

Re: Regarding @Inject vs @EJB for EJB

2014-10-06 Thread Lars-Fredrik Smedberg
, hwaastad he...@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

Re: Regarding @Inject vs @EJB for EJB

2014-10-06 Thread Romain Manni-Bucau
: ...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

Regarding @Inject vs @EJB for EJB

2014-10-03 Thread Lars-Fredrik Smedberg
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

Re: Regarding @Inject vs @EJB for EJB

2014-10-03 Thread 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 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

Re: Regarding @Inject vs @EJB for EJB

2014-10-03 Thread karl . kilden
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 asot...@gmail.com: Well I don't know exactly how EJB and CDI is managed internally by TomEE. But using @Inject whatever the class is

Re: Regarding @Inject vs @EJB for EJB

2014-10-03 Thread Andy Gumbrecht
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 asot...@gmail.com wrote: Well I don't know exactly how EJB and CDI is managed internally by TomEE. But using

Re: Regarding @Inject vs @EJB for EJB

2014-10-03 Thread Howard W. Smith, Jr.
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, karl.kil...@gmail.com wrote: Hi, I am not sure

Re: Regarding @Inject vs @EJB for EJB

2014-10-03 Thread Andy Gumbrecht
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

Re: Regarding @Inject vs @EJB for EJB

2014-10-03 Thread hwaastad
...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.

Re: Regarding @Inject vs @EJB for EJB

2014-10-03 Thread Alex Soto
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

Re: Regarding @Inject vs @EJB for EJB

2014-10-03 Thread Romain Manni-Bucau
-- 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

Re: Regarding @Inject vs @EJB for EJB

2014-10-03 Thread John D. Ament
fir example El divendres, 3 octubre de 2014, hwaastad he...@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