File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception ques.

 
Tontang Bei
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What will happen if I call getRollbackOnly() or SetRollbackOnly() of EJBContext in methods not marked with Required, RequiresNew or Mandatory? will I get an exception?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would you get an exception ? You would have a transaction and CMT and you can setrollbackonly from the context. Its legal. If you use the userTransaction however, thats another question.
 
Malan Subramanian
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm... Assuming that am calling setRollbackOnly() in a CMT bean whose business method has a transaction attribute, NotSupported or Never, then an exception should definitely be thrown coz there is no active transaction available for rollback.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic