posted 20 years ago
When a transaction rolls back the client receives the equivalent of a runtime exception. This means that, like any runtime exception (uncaught), usually the stack trace will appear on the console, or the application will stop working. For instance, when I get a NullPointerException for my application (which is a runtime exception), I get the stack trace of what happened (like: something bad happened). This is fine for CMT, as it's the container which manages transactions (unless the bean's developer can force it to rollback), and if it decides to rollback a transaction it's probably because something bad happened; but BMT, it's be bean developer who has got complete control over transaction behaviour, and if a rollback is thrown, this doesn't mean necessarily that something bad as a runtime exception occurred. The bean developer may decide to rollback a transaction if he realizes for instance that there were no enough funds in a bank account: now, is this a reason enough to throw the equivalent of a system exception?
Marco Tedone<br />SCJP1.4,SCJP5,SCBCD,SCWCD