wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Default EJB transaction attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Default EJB transaction attribute" Watch "Default EJB transaction attribute" New topic
Author

Default EJB transaction attribute

Mohammad Nabeeluddin Ansari
Greenhorn

Joined: Apr 20, 2011
Posts: 10
Hi,

Can someone please tell me what is the default transaction attribute in EJB 2.0,3.0 Container managed transactions.

I think I have somewhere read it is Support for EJB 2.0 and it is Required for EJb 3.0.

But on the internet it is mentioned that the default transaction attribute is dependent on the Application server one is using and the default transaction type varies depending on the server.I could not get one final answer.

Also this could not be verified from the code as one cannot access the presence of a transaction in the EJB bean as it is not allowed while using Container managed transactions.

Regards:
Nabeel
lokesh sree
Ranch Hand

Joined: Oct 27, 2009
Posts: 99

Hi Nabeel,

In case of EJB3.0, the spec says the following

By default, if a TransactionAttribute annotation is not specified for a method of an enterprise
bean with container-managed transaction demarcation, the value of the transaction attribute for the
method is defined to be REQUIRED.


Lokesh
( SCBCD 5, CCENT, SCJP 5 )
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Default EJB transaction attribute
 
Similar Threads
Private Methods in Stateless EJB
Deafult behaviour of EJB Container Managed Transaction
transaction rolling back
Trans. attribute
Transaction Problem