Skip to main content

Adam Bien: @Inject vs. @EJB

@Inject vs. @EJB: You can use both annotations to inject EJBs. Start with @Inject and if you encounter any problems, switch to @EJB. @Inject does not have any methods / attributes- it is just a plain annotation... On the other hand, the @EJB annotation allows you to pass additional information, which could be useful to reference remote EJBs, or...