Search in sources :

Example 1 with TransactionOperationsManager

use of com.sun.enterprise.transaction.spi.TransactionOperationsManager in project Payara by payara.

the class UserTransactionImpl method begin.

public void begin() throws NotSupportedException, SystemException {
    if (!initialized)
        init();
    if (userTx != null) {
        userTx.begin();
        return;
    }
    ComponentInvocation inv = invocationManager.getCurrentInvocation();
    if (inv != null) {
        checkUserTransactionMethodAccess(inv);
    }
    transactionManager.begin();
    try {
        if (inv != null) {
            TransactionOperationsManager toMgr = (TransactionOperationsManager) inv.getTransactionOperationsManager();
            if (toMgr != null)
                toMgr.doAfterUtxBegin();
            inv.setTransaction(transactionManager.getTransaction());
            transactionManager.enlistComponentResources();
        }
    } catch (RemoteException ex) {
        _logger.log(Level.SEVERE, "enterprise_distributedtx.excep_in_utx_begin", ex);
        SystemException sysEx = new SystemException(ex.getMessage());
        sysEx.initCause(ex);
        throw sysEx;
    }
}
Also used : ComponentInvocation(org.glassfish.api.invocation.ComponentInvocation) TransactionOperationsManager(com.sun.enterprise.transaction.spi.TransactionOperationsManager) RemoteException(java.rmi.RemoteException)

Aggregations

TransactionOperationsManager (com.sun.enterprise.transaction.spi.TransactionOperationsManager)1 RemoteException (java.rmi.RemoteException)1 ComponentInvocation (org.glassfish.api.invocation.ComponentInvocation)1