Is there a quickstart example that uses EntityManager with transactions from a servlet ?

Solution Verified - Updated -

Issue

  • We cannot find a quickstart example that uses EntityManager with transactions from a Servlet. Do I need to use a stateless Session Bean?
  • How can we configure the EntityManager in a Servlet ?
  • What is the difference in using @EJB and the CDI @Inject while injecting the Bean ?
  • Is there any advantage of using the @Inject as oppossed to using the @EJB ?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.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