CMT is used. A client with an existing transaction calls a method on a bean that has a Required transaction attribute and so the method runs in the client's transaction. The bean method throws a null pointer exception. Will the client stack trace show a TransactionRolledbackException for a remote call or a NullPointerException or both?
Could a client get a TransactionRolledbackException in a situation other than the above scenario?
If setRollbackOnly() is called before system exception (nullpoint or any unexpected exception) then method won't throw TransactionRollbackedException().
If setRollbackOnly() isn't define in that case remote method call will get TransactionRolledbackException(). Remember remote client get RemoteException() for any system exception throw at server side and those are never pass as it is by server. (only application exception are pass as its by server to client).
Also refer page number 551 from Head First
EJB for exception hierarchy.
Hope this help.
SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1