Originally posted by Binoj Viswanathan:
Hi,
The container will throw javax.txn.NotSupportedException
binoj
javax.transaction.NotSupportedException is a checked exception thrown by UserTransaction.begin() method. So this exception, must be either be handled or declared in
private void subMethod(){
ut.begin();
}
(John Tao code snippet)
If the exception was handled in subMethod() or mainMethod() then, it would wrap and throw it as an EJBException to the container. The container in turn will throw it as RemoteException (if remote) or EJBException (if local) to the client. Hence the client will see it as RemoteException or EJBException.
I would say that javax.transaction.NotSupportedException is an unexpected exception in the client point of view, as the client need not know what type of transaction is used in the bean (Flat Transaction or Nested Transaction).
(In reference to Page 543 of HFEJB)