posted 18 years ago
Okay, this time I have a mock exam question concerned with Exceptions.
The debate I have is with the interface hierarchy quoted in the question:
If a remote client in a transaction context invokes a business method on a bean with container-managed transaction (the business method has transaction attribute as either Required, Mandatory, and Supports) and the bean throws a non-application exception, the transaction is marked for rollback. The client then receives javax.transaction.TransactionRolledbackException (subclass of java.rmi.RemoteException) which indicates that the transaction has definitely been marked for rollback.
Whats the problem? Well HFEJB quotes TransactionRolledbackException as deriving from javax.ejb NOT javax.transaction. Which is correct?