private void setRollbackOnlyInternal(Throwable cause) {
try {
javax.transaction.Transaction trans =
_runtime.getTransactionManager().getTransaction();
if (trans == null)
throw new InvalidStateException(_loc.get("null-trans"));
// ensure tran is in a valid state to accept the setRollbackOnly
int tranStatus = trans.getStatus();
if ((tranStatus != Status.STATUS_NO_TRANSACTION)
&& (tranStatus != Status.STATUS_ROLLEDBACK)
&& (tranStatus != Status.STATUS_COMMITTED))