• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Clarification from j2eecertificate-exception

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ejbcert-- clarification
Answers 2 and 4 are correct. When the container starts a transaction, it is responsible for controlling the transaction when it receives an exception. If the bean method throws an application exception but does not mark the transaction for rollback, **the container will commit the transaction before re-throwing the application exception to the client**. If the bean method marks the transaction for rollback, the container will roll back the transaction before re-throwing the application exception to the client.

------------------------------------------------------------------------
Will the container commit the trsxn before rethrowing the application excetpion?

regards
Stephen
 
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is only true for stateless session beans and message driven beans no ?
Since method calls to statefull session beans (and entity beans too if I'm not mistaking) may span multiple method calls. So if one method throws an application exception, the transaction can still be continued ?
reply
    Bookmark Topic Watch Topic
  • New Topic