The EJB Transaction Attribute that ensures the method call and always takes place in a transaction, either client started or container started are

Options
- TX_SUPPORTS
- TX_MANDATORY
- TX_REQUIRED and TX_REQUIRES_NEW
- Either A or B


CORRECT ANSWER : TX_REQUIRED and TX_REQUIRES_NEW

Discussion Board
Transaction attribute required and requiresnew

TransactionAttributeType is a type enum and used with the TransactionAttribute annotation which specify whether the methods of a session bean or message driven bean are called with a valid transaction context. EJB bean implements the SessionSynchronization interface or the annotations where the values required is as follows:
REQUIRED, REQUIRES_NEW.

These are basically the methods used by the Java Beans. To elaborate more on these terms:

REQUIRED- is used if a client the enterprise bean's method while the client is associated with a transaction context. The container establishes the connection of the bean in the client's transaction context.
REQUIRES_NEW- is used when the container invokes an enterprise bean method whose transaction attribute is set to REQUIRES_NEW with a new transaction context.

Rohit Sharma 08-25-2014 07:37 PM

Write your comments

 
   
 
 

Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement