I come through the code listing below on pg193 to pg194 of book
EJB 3 IN ACTION
where the explanation on pg195 state that
"By default, application exceptions do not cause an automatic CMT rollback since the rollback element is defaulted to false. However, setting the element to true tells the container that it should roll back the transaction before the exception is passed on to the client. ... means that whenever a CreditValidationException, CreditProcessingException, or
DatabaseException is thrown, the transaction will be rolled back ..."
my question is ,
1) if DatabaseException is not being applied with @ApplicationException annotation, it is a RuntimeException and thus is a system exception which will be wrapped in EJBException, so surely it will be rolled back, am I right ?
2) now follow the code listed, DatabaseException is applied with @ApplicationException annotation, thus it is an application exception. And with the rollback=false, the transaction should not rollback right ?