public void cleanupOnError(Throwable t) {
if (t instanceof StandardException) {
StandardException se = (StandardException) t;
if (se.getSeverity() >= ExceptionSeverity.SESSION_SEVERITY) {
popMe();
return;
}
if (se.getSeverity() == ExceptionSeverity.TRANSACTION_SEVERITY) {
synchronized (this) {
// disable use of the connection until it is cleaned up.
conn.setApplicationConnection(null);
notifyAll();
associationState = TRO_FAIL;
if (SQLState.DEADLOCK.equals(se.getMessageId()))
rollbackOnlyCode = XAException.XA_RBDEADLOCK;
else if (SQLState.LOCK_TIMEOUT.equals(se.getMessageId()))
rollbackOnlyCode = XAException.XA_RBTIMEOUT;
else
rollbackOnlyCode = XAException.XA_RBOTHER;
}
}