// Wrap the error to give a reasonable stacktrace since the resource
// could have been enlisted by a different thread
if (enlistError == failedToEnlist)
{
throw new SystemException(bundle.systemExceptionWhenFailedToEnlistEqualsCurrentTx(
failedToEnlist, this.currentTx));
}
else
{
SystemException e = new SystemException(error);
e.initCause(enlistError);
throw e;
}
}
if (!enlisted)
{