Java Code Examples for javax.transaction.Status#STATUS_COMMITTING

The following examples show how to use javax.transaction.Status#STATUS_COMMITTING . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TransactionContext.java    From quarkus with Apache License 2.0 6 votes vote down vote up
/**
 * The transaction scoped context is active when a transaction is active.
 */
@Override
public boolean isActive() {
    Transaction transaction = getCurrentTransaction();
    if (transaction == null) {
        return false;
    }

    try {
        int currentStatus = transaction.getStatus();
        return currentStatus == Status.STATUS_ACTIVE ||
                currentStatus == Status.STATUS_MARKED_ROLLBACK ||
                currentStatus == Status.STATUS_PREPARED ||
                currentStatus == Status.STATUS_UNKNOWN ||
                currentStatus == Status.STATUS_PREPARING ||
                currentStatus == Status.STATUS_COMMITTING ||
                currentStatus == Status.STATUS_ROLLING_BACK;
    } catch (SystemException e) {
        throw new RuntimeException("Error getting the status of the current transaction", e);
    }
}
 
Example 2
Source File: TracingTransactionInterceptor.java    From rice with Educational Community License v2.0 6 votes vote down vote up
/**
 * @param txStatus
 * @return String
 */
private static final String toString(int txStatus) {
    switch (txStatus) {
        case Status.STATUS_ACTIVE: return "STATUS_ACTIVE";
        case Status.STATUS_COMMITTED: return "STATUS_COMMITTED";  
        case Status.STATUS_COMMITTING: return "STATUS_COMMITTING";
        case Status.STATUS_MARKED_ROLLBACK: return "STATUS_MARKED_ROLLBACK";
        case Status.STATUS_NO_TRANSACTION: return "STATUS_NO_TRANSACTION";
        case Status.STATUS_PREPARED: return "STATUS_PREPARED";
        case Status.STATUS_PREPARING: return "STATUS_PREPARING";
        case Status.STATUS_ROLLEDBACK: return "STATUS_ROLLEDBACK";
        case Status.STATUS_ROLLING_BACK: return "STATUS_ROLLING_BACK";
        case Status.STATUS_UNKNOWN: return "STATUS_UNKNOWN";
        default: return "unknown status: " + txStatus;
    }
}
 
Example 3
Source File: TransactionRecoveryImpl.java    From ByteJTA with GNU Lesser General Public License v3.0 6 votes vote down vote up
protected void recoverParticipant(Transaction transaction)
		throws CommitRequiredException, RollbackRequiredException, SystemException {

	TransactionImpl transactionImpl = (TransactionImpl) transaction;
	switch (transaction.getTransactionStatus()) {
	case Status.STATUS_PREPARED:
	case Status.STATUS_COMMITTING:
		break;
	case Status.STATUS_COMMITTED:
	case Status.STATUS_ROLLEDBACK:
		break;
	case Status.STATUS_ACTIVE:
	case Status.STATUS_MARKED_ROLLBACK:
	case Status.STATUS_PREPARING:
	case Status.STATUS_UNKNOWN:
	case Status.STATUS_ROLLING_BACK:
	default:
		transactionImpl.recoveryRollback();
		transactionImpl.forgetQuietly();
	}
}
 
Example 4
Source File: AbstractLuceneIndexerImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 6 votes vote down vote up
/**
 * Mark this index for roll back only. This action can not be reversed. It will reject all other work and only allow
 * roll back.
 */
public void setRollbackOnly()
{
    switch (getStatus().getStatus())
    {
    case Status.STATUS_COMMITTING:
        throw new IndexerException("Unable to mark for rollback: Transaction is committing");
    case Status.STATUS_COMMITTED:
        throw new IndexerException("Unable to mark for rollback: Transaction is committed");
    default:
        try
        {
            doSetRollbackOnly();
            setStatus(TransactionStatus.MARKED_ROLLBACK);
        }
        catch (IOException e)
        {
            throw new LuceneIndexException("Set rollback only failed ", e);
        }
        break;
    }
}
 
Example 5
Source File: TransactionRecoveryImpl.java    From ByteJTA with GNU Lesser General Public License v3.0 6 votes vote down vote up
protected void recoverCoordinator(Transaction transaction)
		throws CommitRequiredException, RollbackRequiredException, SystemException {

	switch (transaction.getTransactionStatus()) {
	case Status.STATUS_ACTIVE:
	case Status.STATUS_MARKED_ROLLBACK:
	case Status.STATUS_PREPARING:
	case Status.STATUS_ROLLING_BACK:
	case Status.STATUS_UNKNOWN:
		transaction.recoveryRollback();
		transaction.forgetQuietly();
		break;
	case Status.STATUS_PREPARED:
	case Status.STATUS_COMMITTING:
		transaction.recoveryCommit();
		transaction.forgetQuietly();
		break;
	case Status.STATUS_COMMITTED:
	case Status.STATUS_ROLLEDBACK:
		transaction.forgetQuietly();
		break;
	default:
		logger.debug("Current transaction has already been completed.");
	}
}
 
Example 6
Source File: CompensableTransactionImpl.java    From ByteTCC with GNU Lesser General Public License v3.0 5 votes vote down vote up
public synchronized void recover() throws SystemException {
	if (this.transactionStatus == Status.STATUS_PREPARED //
			|| this.transactionStatus == Status.STATUS_COMMITTING) {
		this.recoverNativeResource(true);
		this.recoverRemoteResource(true);
	} else if (this.transactionStatus == Status.STATUS_PREPARING //
			|| this.transactionStatus == Status.STATUS_ROLLING_BACK) {
		this.recoverNativeResource(false);
		this.recoverRemoteResource(false);
	}
}
 
Example 7
Source File: DeleteAllInBatchesForNonOperationListCommand.java    From reladomo with Apache License 2.0 5 votes vote down vote up
public void afterCompletion(int status)
{
    if (status == Status.STATUS_COMMITTED || status == Status.STATUS_COMMITTING)
    {
        currentStart = end;
    }
    else if (batchSize[0] > 100)
    {
        batchSize[0] /= 2;
    }
}
 
Example 8
Source File: TransactionUtil.java    From scipio-erp with Apache License 2.0 5 votes vote down vote up
public static String getTransactionStateString(int state) {
    /*
     * javax.transaction.Status
     * STATUS_ACTIVE           0
     * STATUS_MARKED_ROLLBACK  1
     * STATUS_PREPARED         2
     * STATUS_COMMITTED        3
     * STATUS_ROLLEDBACK       4
     * STATUS_UNKNOWN          5
     * STATUS_NO_TRANSACTION   6
     * STATUS_PREPARING        7
     * STATUS_COMMITTING       8
     * STATUS_ROLLING_BACK     9
     */
    switch (state) {
        case Status.STATUS_ACTIVE:
            return "Transaction Active (" + state + ")";
        case Status.STATUS_COMMITTED:
            return "Transaction Committed (" + state + ")";
        case Status.STATUS_COMMITTING:
            return "Transaction Committing (" + state + ")";
        case Status.STATUS_MARKED_ROLLBACK:
            return "Transaction Marked Rollback (" + state + ")";
        case Status.STATUS_NO_TRANSACTION:
            return "No Transaction (" + state + ")";
        case Status.STATUS_PREPARED:
            return "Transaction Prepared (" + state + ")";
        case Status.STATUS_PREPARING:
            return "Transaction Preparing (" + state + ")";
        case Status.STATUS_ROLLEDBACK:
            return "Transaction Rolledback (" + state + ")";
        case Status.STATUS_ROLLING_BACK:
            return "Transaction Rolling Back (" + state + ")";
        case Status.STATUS_UNKNOWN:
            return "Transaction Status Unknown (" + state + ")";
        default:
            return "Not a valid state code (" + state + ")";
    }
}
 
Example 9
Source File: TransactionContext.java    From openwebbeans-meecrowave with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isActive() {
    try {
        final int status = transactionManager.getTransaction().getStatus();
        return status == Status.STATUS_ACTIVE || status == Status.STATUS_MARKED_ROLLBACK
                || status == Status.STATUS_PREPARED || status == Status.STATUS_PREPARING
                || status == Status.STATUS_COMMITTING || status == Status.STATUS_ROLLING_BACK
                || status == Status.STATUS_UNKNOWN;
    } catch (final Throwable e) {
        return false;
    }
}
 
Example 10
Source File: JackRabbitUserTransaction.java    From mycollab with GNU Affero General Public License v3.0 5 votes vote down vote up
/**
 * @see javax.transaction.UserTransaction#commit
 */
@Override
public void commit() throws IllegalStateException, RollbackException, SecurityException, SystemException {

    if (status != Status.STATUS_ACTIVE) {
        throw new IllegalStateException("Transaction not active");
    }

    try {
        xares.end(xid, XAResource.TMSUCCESS);

        status = Status.STATUS_PREPARING;
        xares.prepare(xid);
        status = Status.STATUS_PREPARED;

        status = Status.STATUS_COMMITTING;
        xares.commit(xid, false);
        status = Status.STATUS_COMMITTED;

    } catch (XAException e) {

        if (e.errorCode >= XAException.XA_RBBASE && e.errorCode <= XAException.XA_RBEND) {
            RollbackException rollbackException = new RollbackException(e.toString());
            rollbackException.initCause(e);
            throw rollbackException;
        }

        final SystemException systemException = new SystemException("Unable to commit transaction: " + "XA_ERR="
                + e.errorCode);
        systemException.initCause(e);
        throw systemException;
    }
}
 
Example 11
Source File: AbstractLuceneIndexerImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Roll back the index changes (this just means they are never added)
 * 
 * @throws LuceneIndexException
 */
public void rollback() throws LuceneIndexException
{
    switch (getStatus().getStatus())
    {

    case Status.STATUS_COMMITTED:
        throw new IndexerException("Unable to roll back: Transaction is committed ");
    case Status.STATUS_ROLLING_BACK:
        throw new IndexerException("Unable to roll back: Transaction is rolling back");
    case Status.STATUS_ROLLEDBACK:
        throw new IndexerException("Unable to roll back: Transaction is already rolled back");
    case Status.STATUS_COMMITTING:
        // Can roll back during commit
    default:
        try
        {
            setStatus(TransactionStatus.ROLLINGBACK);
            doRollBack();
            setStatus(TransactionStatus.ROLLEDBACK);
        }
        catch (IOException e)
        {
            throw new LuceneIndexException("rollback failed ", e);
        }
        break;
    }
}
 
Example 12
Source File: AbstractLuceneIndexerImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Utility method to report errors about invalid state.
 * 
 * @return - an error based on status
 */
private String buildErrorString()
{
    StringBuilder buffer = new StringBuilder(128);
    buffer.append("The indexer is unable to accept more work: ");
    switch (getStatus().getStatus())
    {
    case Status.STATUS_COMMITTED:
        buffer.append("The indexer has been committed");
        break;
    case Status.STATUS_COMMITTING:
        buffer.append("The indexer is committing");
        break;
    case Status.STATUS_MARKED_ROLLBACK:
        buffer.append("The indexer is marked for rollback");
        break;
    case Status.STATUS_PREPARED:
        buffer.append("The indexer is prepared to commit");
        break;
    case Status.STATUS_PREPARING:
        buffer.append("The indexer is preparing to commit");
        break;
    case Status.STATUS_ROLLEDBACK:
        buffer.append("The indexer has been rolled back");
        break;
    case Status.STATUS_ROLLING_BACK:
        buffer.append("The indexer is rolling back");
        break;
    case Status.STATUS_UNKNOWN:
        buffer.append("The indexer is in an unknown state");
        break;
    default:
        break;
    }
    return buffer.toString();
}
 
Example 13
Source File: TransactionContext.java    From tomee with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isActive() {
    try {
        final int status = transactionManager.getTransaction().getStatus();
        return status == Status.STATUS_ACTIVE || status == Status.STATUS_MARKED_ROLLBACK
            || status == Status.STATUS_PREPARED || status == Status.STATUS_PREPARING
            || status == Status.STATUS_COMMITTING || status == Status.STATUS_ROLLING_BACK
            || status == Status.STATUS_UNKNOWN;
    } catch (final Throwable e) {
        return false;
    }
}
 
Example 14
Source File: LazyUserTransaction.java    From lastaflute with Apache License 2.0 4 votes vote down vote up
protected static String buildLazyTxExp() {
    final int status;
    try {
        final TransactionManager manager = ContainerUtil.getComponent(TransactionManager.class); // for static use
        status = manager.getStatus();
    } catch (SystemException e) {
        throw new IllegalStateException("Failed to get status from transaction manager.", e);
    }
    final String statusExp;
    if (status == Status.STATUS_ACTIVE) {
        statusExp = "Active";
    } else if (status == Status.STATUS_MARKED_ROLLBACK) {
        statusExp = "MarkedRollback";
    } else if (status == Status.STATUS_PREPARED) {
        statusExp = "Prepared";
    } else if (status == Status.STATUS_COMMITTED) {
        statusExp = "Committed";
    } else if (status == Status.STATUS_ROLLEDBACK) {
        statusExp = "RolledBack";
    } else if (status == Status.STATUS_UNKNOWN) {
        statusExp = "Unknown";
    } else if (status == Status.STATUS_NO_TRANSACTION) {
        statusExp = "NoTransaction";
    } else if (status == Status.STATUS_PREPARING) {
        statusExp = "Preparing";
    } else if (status == Status.STATUS_COMMITTING) {
        statusExp = "Committing";
    } else if (status == Status.STATUS_ROLLING_BACK) {
        statusExp = "RollingBack";
    } else {
        statusExp = String.valueOf(status);
    }
    final StringBuilder sb = new StringBuilder();
    sb.append("[").append(statusExp).append("]");
    boolean secondOrMore = false;
    if (isLazyTransactionReadyLazy()) {
        sb.append(secondOrMore ? ", " : "").append("readyLazy");
        secondOrMore = true;
    }
    if (isLazyTransactionLazyBegun()) {
        sb.append(secondOrMore ? ", " : "").append("lazyBegun");
        secondOrMore = true;
    }
    if (isLazyTransactionRealBegun()) {
        sb.append(secondOrMore ? ", " : "").append("realBegun");
        secondOrMore = true;
    }
    final Integer hierarchyLevel = getCurrentHierarchyLevel();
    if (hierarchyLevel != null) {
        sb.append(secondOrMore ? ", " : "").append("hierarchy=").append(hierarchyLevel);
        secondOrMore = true;
    }
    final List<IndependentProcessor> lazyProcessList = getLazyProcessList();
    if (!lazyProcessList.isEmpty()) {
        sb.append(secondOrMore ? ", " : "").append("lazyProcesses=").append(lazyProcessList.size());
        secondOrMore = true;
    }
    final ForcedlyBegunResumer resumer = getForcedlyBegunResumer();
    if (resumer != null) {
        sb.append(secondOrMore ? ", " : "").append("resumer=").append(DfTypeUtil.toClassTitle(resumer));
        secondOrMore = true;
    }
    return sb.toString();
}
 
Example 15
Source File: AbstractLuceneIndexerImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * Prepare to commit At the moment this makes sure we have all the locks TODO: This is not doing proper
 * serialisation against the index as would a data base transaction.
 * 
 * @return the tx state
 * @throws LuceneIndexException
 */
public int prepare() throws LuceneIndexException
{
    if (s_logger.isDebugEnabled())
    {
        s_logger.debug(Thread.currentThread().getName() + " Starting Prepare");
    }
    switch (getStatus().getStatus())
    {
    case Status.STATUS_COMMITTING:
        throw new IndexerException("Unable to prepare: Transaction is committing");
    case Status.STATUS_COMMITTED:
        throw new IndexerException("Unable to prepare: Transaction is commited ");
    case Status.STATUS_ROLLING_BACK:
        throw new IndexerException("Unable to prepare: Transaction is rolling back");
    case Status.STATUS_ROLLEDBACK:
        throw new IndexerException("Unable to prepare: Transaction is aleady rolled back");
    case Status.STATUS_MARKED_ROLLBACK:
        throw new IndexerException("Unable to prepare: Transaction is marked for roll back");
    case Status.STATUS_PREPARING:
        throw new IndexerException("Unable to prepare: Transaction is already preparing");
    case Status.STATUS_PREPARED:
        throw new IndexerException("Unable to prepare: Transaction is already prepared");
    default:
        try
        {
            setStatus(TransactionStatus.PREPARING);
            if (isModified())
            {
                doPrepare();
                if (s_logger.isDebugEnabled())
                {
                    s_logger.debug(Thread.currentThread().getName() + " Waiting to Finish Preparing");
                }                    
            }
            setStatus(TransactionStatus.PREPARED);
            return isModified() ? XAResource.XA_OK : XAResource.XA_RDONLY;
        }
        catch (LuceneIndexException e)
        {
            setRollbackOnly();
            if (s_logger.isDebugEnabled())
            {
                s_logger.debug(Thread.currentThread().getName() + " Prepare Failed", e);
            }
            throw new LuceneIndexException("Index failed to prepare", e);
        }
        catch (Throwable t)
        {
            // If anything goes wrong we try and do a roll back
            rollback();
            if (s_logger.isDebugEnabled())
            {
                s_logger.debug(Thread.currentThread().getName() + " Prepare Failed", t);
            }
            throw new LuceneIndexException("Prepared failed", t);                
        }
        finally
        {
            if (s_logger.isDebugEnabled())
            {
                s_logger.debug(Thread.currentThread().getName() + " Ending Prepare");
            }                
        }
    }
}
 
Example 16
Source File: MultiThreadedTx.java    From reladomo with Apache License 2.0 4 votes vote down vote up
@Override
public int getStatus(MultiThreadedTx tx)
{
    return Status.STATUS_COMMITTING;
}
 
Example 17
Source File: AbstractLuceneIndexerImpl.java    From alfresco-repository with GNU Lesser General Public License v3.0 4 votes vote down vote up
/**
 * Commit this index
 * 
 * @throws LuceneIndexException
 */
public void commit() throws LuceneIndexException
{
    if (s_logger.isDebugEnabled())
    {
        s_logger.debug(Thread.currentThread().getName() + " Starting Commit");
    }
    switch (getStatus().getStatus())
    {
    case Status.STATUS_COMMITTING:
        throw new LuceneIndexException("Unable to commit: Transaction is committing");
    case Status.STATUS_COMMITTED:
        throw new LuceneIndexException("Unable to commit: Transaction is commited ");
    case Status.STATUS_ROLLING_BACK:
        throw new LuceneIndexException("Unable to commit: Transaction is rolling back");
    case Status.STATUS_ROLLEDBACK:
        throw new LuceneIndexException("Unable to commit: Transaction is aleady rolled back");
    case Status.STATUS_MARKED_ROLLBACK:
        throw new LuceneIndexException("Unable to commit: Transaction is marked for roll back");
    case Status.STATUS_PREPARING:
        throw new LuceneIndexException("Unable to commit: Transaction is preparing");
    case Status.STATUS_ACTIVE:
        // special case - commit from active
        prepare();
        // drop through to do the commit;
    default:
        if (getStatus().getStatus() != Status.STATUS_PREPARED)
        {
            throw new LuceneIndexException("Index must be prepared to commit");
        }
        try
        {
            setStatus(TransactionStatus.COMMITTING);
            if (isModified())
            {
                doCommit();
            }
            setStatus(TransactionStatus.COMMITTED);
        }
        catch (LuceneIndexException e)
        {
            // If anything goes wrong we try and do a roll back
            rollback();
            if (s_logger.isDebugEnabled())
            {
                s_logger.debug(Thread.currentThread().getName() + " Commit Failed", e);
            }
            throw new LuceneIndexException("Commit failed", e);
        }
        catch (Throwable t)
        {
            // If anything goes wrong we try and do a roll back
            rollback();
            if (s_logger.isDebugEnabled())
            {
                s_logger.debug(Thread.currentThread().getName() + " Commit Failed", t);
            }
            throw new LuceneIndexException("Commit failed", t);                
        }
        finally
        {
            if (s_logger.isDebugEnabled())
            {
                s_logger.debug(Thread.currentThread().getName() + " Ending Commit");
            }
            
            // Make sure we tidy up
            // deleteDelta();
        }
        break;
    }
}
 
Example 18
Source File: MithraManager.java    From reladomo with Apache License 2.0 4 votes vote down vote up
private boolean isStatusActive(int status)
{
    return status == Status.STATUS_ACTIVE       || status == Status.STATUS_COMMITTING  ||
           status == Status.STATUS_PREPARED     || status == Status.STATUS_PREPARING   ||
           status == Status.STATUS_ROLLING_BACK || status == Status.STATUS_MARKED_ROLLBACK;
}
 
Example 19
Source File: CoreUserTransaction.java    From tomee with Apache License 2.0 4 votes vote down vote up
private static String getStatus(final int status) {
    final StringBuilder buffer = new StringBuilder(100);
    switch (status) {
        case Status.STATUS_ACTIVE:
            buffer.append("STATUS_ACTIVE: ");
            buffer.append("A transaction is associated with the target object and it is in the active state.");
            break;
        case Status.STATUS_COMMITTED:
            buffer.append("STATUS_COMMITTED: ");
            buffer.append("A transaction is associated with the target object and it has been committed.");
            break;
        case Status.STATUS_COMMITTING:
            buffer.append("STATUS_COMMITTING: ");
            buffer.append("A transaction is associated with the target object and it is in the process of committing.");
            break;
        case Status.STATUS_MARKED_ROLLBACK:
            buffer.append("STATUS_MARKED_ROLLBACK: ");
            buffer.append("A transaction is associated with the target object and it has been marked for rollback, perhaps as a result of a setRollbackOnly operation.");
            break;
        case Status.STATUS_NO_TRANSACTION:
            buffer.append("STATUS_NO_TRANSACTION: ");
            buffer.append("No transaction is currently associated with the target object.");
            break;
        case Status.STATUS_PREPARED:
            buffer.append("STATUS_PREPARED: ");
            buffer.append("A transaction is associated with the target object and it has been prepared, i.e.");
            break;
        case Status.STATUS_PREPARING:
            buffer.append("STATUS_PREPARING: ");
            buffer.append("A transaction is associated with the target object and it is in the process of preparing.");
            break;
        case Status.STATUS_ROLLEDBACK:
            buffer.append("STATUS_ROLLEDBACK: ");
            buffer.append("A transaction is associated with the target object and the outcome has been determined as rollback.");
            break;
        case Status.STATUS_ROLLING_BACK:
            buffer.append("STATUS_ROLLING_BACK: ");
            buffer.append("A transaction is associated with the target object and it is in the process of rolling back.");
            break;
        default:
            buffer.append("Unknown status ").append(status);
            break;
    }
    return buffer.toString();
}
 
Example 20
Source File: TransactionRecoveryImpl.java    From ByteTCC with GNU Lesser General Public License v3.0 4 votes vote down vote up
protected void recoverCoordinator(Transaction transaction)
		throws CommitRequiredException, RollbackRequiredException, SystemException {
	CompensableManager compensableManager = this.beanFactory.getCompensableManager();
	TransactionLock compensableLock = this.beanFactory.getCompensableLock();

	org.bytesoft.transaction.TransactionContext transactionContext = transaction.getTransactionContext();
	TransactionXid xid = transactionContext.getXid();

	boolean forgetRequired = false;
	boolean locked = false;
	try {
		compensableManager.associateThread(transaction);

		switch (transaction.getTransactionStatus()) {
		case Status.STATUS_ACTIVE:
		case Status.STATUS_MARKED_ROLLBACK:
		case Status.STATUS_PREPARING:
		case Status.STATUS_UNKNOWN: /* TODO */ {
			if (transactionContext.isPropagated() == false) {
				if ((locked = compensableLock.lockTransaction(xid, this.endpoint)) == false) {
					throw new SystemException(XAException.XAER_PROTO);
				}

				transaction.recoveryRollback();
				forgetRequired = true;
			}
			break;
		}
		case Status.STATUS_ROLLING_BACK: {
			if ((locked = compensableLock.lockTransaction(xid, this.endpoint)) == false) {
				throw new SystemException(XAException.XAER_PROTO);
			}

			transaction.recoveryRollback();
			forgetRequired = true;
			break;
		}
		case Status.STATUS_PREPARED:
		case Status.STATUS_COMMITTING: {
			if ((locked = compensableLock.lockTransaction(xid, this.endpoint)) == false) {
				throw new SystemException(XAException.XAER_PROTO);
			}

			transaction.recoveryCommit();
			forgetRequired = true;
			break;
		}
		case Status.STATUS_COMMITTED:
		case Status.STATUS_ROLLEDBACK:
			forgetRequired = true;
			break;
		default: // ignore
		}
	} finally {
		compensableManager.desociateThread();
		if (locked) {
			compensableLock.unlockTransaction(xid, this.endpoint);
		} // end-if (locked)
		if (forgetRequired) {
			transaction.forgetQuietly(); // forget transaction
		} // end-if (forgetRequired)
	}

}