Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unspecified transaction context can roll back?

 
lim dejie
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a system expection is throwed from a bean instance, what happened to the transaction if it is in an unspecified transaction context?

Will container mark the transaction for rollback?

I guess it won't. please correct me if i am wrong, or affirm me if i am right.

(Why i ask this question, because i found that a few mock exam questions put "The container will mark the transaction for rollback" as a right choice when a system exception occured from a bean instance, but the question itself doesn't mention whether the bean is involved in a transaction or not)

Thanks
dejie
 
Vinay Raj
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whether the transaction rollback occurs or not depends on the app. server behavior. Typically app. server allows developer to define the transactional behavior for unspecified context.
 
Rajesh Chande
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just take this from the specs as is:

Pg: 364/572: section 17.6.5
The EJB specification does not prescribe how the Container should manage the execution of a method with an unspecified transaction context´┐Żthe transaction semantics are left to the Container implementation.

Regards,
Tiro.
 
lim dejie
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Thanks for the anwser provided. I was very lucky to find the answer out just one day before i cleared this cert yesterday.

In the spec P375-P378, the tables clearly described how the container handle all the exceptions with different transaction attributes.

Regards
dejie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic