aspose file tools*
The moose likes BEA/Weblogic and the fly likes Default transaction attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Default transaction attribute" Watch "Default transaction attribute" New topic
Author

Default transaction attribute

Ashutosh Shinde
Ranch Hand

Joined: Jun 07, 2001
Posts: 42
Hello All,
What is the default transaction attribute set for methods of the Session/Entity bean when the transaction attribute is not explicitly mentioned in the XML file?
Thanks,
Ashutosh
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
There is no default transaction setting dictated by the EJB Specification:
EJB 2.0 Specification, Section 17.5
The Deployer is responsible for ensuring that the methods of the deployed enterprise beans with container-managed transaction demarcation have been assigned a transaction attribute. If the transaction attributes have not been assigned previously by the Assembler, they must be assigned by the Deployer.

If you do not specify a transaction attribute for methods in an EJB then it's transactional behavior will depend on the particular EJB Container that you are using.
In the case of WebLogic, if a transaction attribute is not specified then the EJB or method behaves as if it has a transactional setting of "Supports". JBoss, on the other hand, seems to default to "Required".
For the sake of portability, you should always specify a transaction setting for your EJBs.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Default transaction attribute