Which is guaranteed to work in an EJB container for FooBean to obtain the UserTransaclion object?

FooBean is an EJB 3.0 session bean that can make valid use of UserTransaction. Which is
guaranteed to work in an EJB container for FooBean to obtain the UserTransaclion object?

FooBean is an EJB 3.0 session bean that can make valid use of UserTransaction. Which is
guaranteed to work in an EJB container for FooBean to obtain the UserTransaclion object?

A.
Invoke a method on a SessionContext that returns a UserTransaction object.

B.
Perform JNDI lookup with name “java:/UserTransaction” on an InitialContext.

C.
Perform JNDI lookup with the name “jdbc/UserTransaction” on an InitialContext.

D.
Use the @TransactionManagement annotation to inject an instance variable of type
UserTransaction in a bean class.

Explanation:



Leave a Reply 0

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