Scenario: a stateless session bean method (using container managed transactions) calls an update method on a DAO. The DAO calls a stored procedure that fails and a SQLException is thrown in the DAO. The DAO wraps the SQLException as a checked Exception called MyBusinessException. The stateless session bean method catches MyBusinessException, logs it, and returns (without ever calling setRollbackOnly() ).
In this scenario, won't the
EJB container try to commit a transaction for a stored procedure that failed?