tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars-Fredrik Smedberg <>
Subject Regarding @Inject vs @EJB for EJB
Date Fri, 03 Oct 2014 12:19:35 GMT

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 correct?
3. If the EJB is packaged in another WAR inside the same EAR or in another
EAR I need to use @EJB correct?
4. In case 3 how do I adress the EJB? Where can I read more about the
naming standard?


Med vänlig hälsning / Best regards

Lars-Fredrik Smedberg

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, and destroy all copies of this
message and any attachments.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message