This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes page 561 exercise question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "page 561 exercise question" Watch "page 561 exercise question" New topic
Author

page 561 exercise question

Keith Rosenfield
Ranch Hand

Joined: Nov 25, 2003
Posts: 277
Hi all,
What is the answer for the fourth scenario
The exception for when the client starts a transaction, and the Container has to roll it back.

At first I thought it was TransactionRolledbackException/TransactionRolledBackLocalException but I'm a little confused as to when that exception would be thrown. It also could be any runtime exception, because they always cause the Container to rollback a transaction.
Can someone please clear up my confusion.
Much appreciated.


Keith Rosenfield<br />SCJP<br />SCWCD<br />SCBCD
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Keith,
TransactionRolledbackException/TransactionRolledBackLocalException both are system exception (RemoteException for remote clients / EJBException for local ones). So it's not contradictory with what you write: if a RuntimeException is thrown, the container will rollback the transaction and, in case the client started the transaction, will then throw TransactionRolledbackException or TransactionRolledBackLocalException which are just more specialized system exceptions.
Best,
Phil.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: page 561 exercise question