Which declaration is correct?

A developer is writing a stateless session bean that is obtaining a transaction-scoped entity
manager using injection and assumes the application defines one persistence unit. Which
declaration is correct?

A developer is writing a stateless session bean that is obtaining a transaction-scoped entity
manager using injection and assumes the application defines one persistence unit. Which
declaration is correct?

A.
©ResourceEntityManagerem;

B.
@PersistenceUnit EntityManager em;

C.
@PersistenceContext EntityManager em;

D.
@PersistenceUnit(“TransactionScoped”) EntityManager em;



Leave a Reply 0

Your email address will not be published. Required fields are marked *