if (ctx instanceof BeanTransactionContext == false) {
throw new IllegalStateException("Transaction has not been started");
}
BeanTransactionContext beanContext = (BeanTransactionContext) ctx;
try {
beanContext.rollback();
} finally {
UnspecifiedTransactionContext oldContext = beanContext.getOldContext();
TransactionContext.setContext(oldContext);
oldContext.resume();
}