aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Transaction Att for callback methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction Att for callback methods" Watch "Transaction Att for callback methods" New topic
Author

Transaction Att for callback methods

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
In my Session facade there are many business process methods inserting a record, deleting and selecting a record.
So there are 3 different methods,
createEntity, deleteEntity, selectEntity
For createEntity & deleteEntity I specify the tx attribute as Required
For selectEntity I specify the tx attribute as Never.
What should be the tx attributes for the call back methods.
Should i had to specify If i do not specify will it be in a transaction. if Yes it will be of what type
Manish Malhotra
Greenhorn

Joined: Apr 05, 2003
Posts: 29
By default there wouldnt be any transaction attr. for any method & no need to give tr. att. for the call back methods.
And I dnt think so that you need to give tr. attr. for your Session Facade bean as already from this you are calling the entity bean which you would be having tra. attr.
so, no need to worry abt the callback methods..
regards,
Manish Malhotra
SE. PCS. IND.
aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
I need my entity bean for an add operation should go in Supports tx attribute.
So for my entity bean for an add operation which all methods I had to give the tx- attribute as Supports. As the tx-att Required is by default.
ejbCreate, ejbPostCreate and ejbStore or I had to specify the tx-attribute for some more methods also
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Transaction Att for callback methods