Is @Inject equivalent to @EJB @Resource for injection in EAP?

Solution Verified - Updated -

Issue

  • Is it possible to use @Inject instead of @EJB to inject a reference to an EJB?
  • What is the different between @Inject and @EJB, it seems both work.
  • I am confused with @EJB and @Inject, what it the best way to inject a proxy to invoke an EJB?
  • Is it possible to use @Inject instead of use @Resource?
  • @Inject vs. @EJB

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content