Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

EJB%20Interview%20Questions%20and%20Answers

Question: What are the transaction Attribute?
Answer: Transaction is group of operation or work which should be performed either completely or none to maintain the data integrity. All transaction must have ACID property(atomicity ,consistency,integrity,durability) so transaction can be said completed if we commit on successful execution and rollback on unsuccessful execution.
There are two ways of transaction management.
· Declarative Transaction Mang.
· Programmatic Transaction Mang.
Now we see what the transactions Attribute are
Transaction Attribute conveys to the container the intended transactional behavior of the associated EJB component's method.

Required: if required attribute is associated with Method then new Transaction context may or may not be created, means if method is already associated with transaction context then no new transaction context should be created.

Requires New: if Requires New attribute is associated with Method then always new Transaction context may be created.

NotSupported:if Method is Associated with this Attribute then method is a not a part of transaction.

Supported:if a Method is Associated with this transaction Attribute then method will act as Not supported if calling component is not associated with transaction and if calling component is associated with transaction then act as a required Attribute.

Mandatory:if a method is Associated with this attribute then always be called from calling component transaction context.

Never: if a method is Associated with this attribute then never be called from calling component transaction context.
The default transaction value for EJB is Support.
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook