Code example for SQLTransactionRollbackException

0
            // 40001  transaction rollback  - (transaction) serialization failure 
            // 40002  transaction rollback  - integrity constraint violation 
            // 40003  transaction rollback  - statement completion unknown 
            // 40004  transaction rollback  - triggered action exception 
            // 
            return new SQLTransactionRollbackException(msg, sqlstate, code,
                    cause);
        } else if (sqlstate.startsWith("0A")) {    // JSR 221 2005-12-14 prd
            return new SQLFeatureNotSupportedException(msg, sqlstate, code,
                    cause);
        } else { 
 
            // TODO resolved: 
            // 
            // JSR 221 2005-12-14 prd 
            // 
            //   "Any SQLState class values which are currently not mapped to 
            //    either a SQLNonTransientException or a SQLTransientException 
            //    will result in a java.sql.SQLException being thrown." 
            //