Question on Transaction involved in Enterprise beans
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Belgundi_Abhijit
Posted On:   Sunday, December 2, 2001 04:20 AM

I was going through tutorial on ejb provided by java.sun.com. It is stated that "If the client is associated with transaction then container executes the method with in the same transaction." My Question is At what instance, Transaction actually starts and ends? At what instance client will get associate with transaction and client seperates from the associated transaction? If i have 4 business logic methods in enterprise bean. Does the transaction starts at the invocation of 1st method and ends after execution of 1st method itself...? Kindly let me know, if any one knows answer for my question.    More>>

I was going through tutorial on ejb provided by java.sun.com. It is stated that "If the client is associated with transaction then container executes the method with in the same transaction."



My Question is At what instance, Transaction actually starts and ends?

At what instance client will get associate with transaction and client seperates from the associated transaction?


If i have 4 business logic methods in enterprise bean. Does the transaction starts at the invocation of 1st method and ends after execution of 1st method itself...?

Kindly let me know, if any one knows answer for my question.

   <<Less

Re: Question on Transaction involved in Enterprise beans

Posted By:   Bozidar_Dangubic  
Posted On:   Sunday, December 2, 2001 08:07 AM

it depends. it depends on the transactional attributes of each of the four methods in the enterprise bean. the transaction will start with the first method that specifies transactional properties that require a transaction. if you are calling 4 business methods on the bean and three of the methods call have transactional attribute set to NEVER and last one has transactional attribute set to REQUIRED, the transaction will no get created until the last method is invoked. you specify transactional attributes in the deployment descriptor for each method of each bean. when transaction starts and ends depends on how you specified transactional attributes in the deployment descriptor.
About | Sitemap | Contact