public void localCommit()
    {
        if (log.isDebugEnabled()) log.debug("commit was called");
        if (!this.isInLocalTransaction)
        {
            throw new TransactionNotInProgressException("Not in transaction, call begin() before commit()");
        }
        try
        {
            if(!broker.isManaged())
            {
                if (batchCon != null)
                {
                    batchCon.commit();
                }
                else if (con != null)
                {
                    con.commit();
                }
            }
            else
            {
                if(log.isDebugEnabled()) log.debug(
                        "Found managed environment setting in PB, will skip Connection.commit() call");
            }
        }
        catch (SQLException e)
        {
            log.error("Commit on underlying connection failed, try to rollback connection", e);
            this.localRollback();
            throw new TransactionAbortedException("Commit on connection failed", e);
        }
        finally
        {
            this.isInLocalTransaction = false;
            restoreAutoCommitState();
            this.releaseConnection();
        }
    }
public void localCommit ( ) { if ( log . isDebugEnabled ( ) ) log . debug ( "commit was called" ) ; if ( ! this . isInLocalTransaction ) { throw new TransactionNotInProgressException ( "Not in transaction, call begin() before commit()" ) ; } try { if ( ! broker . isManaged ( ) ) { if ( batchCon != null ) { batchCon . commit ( ) ; } else if ( con != null ) { con . commit ( ) ; } } else { if ( log . isDebugEnabled ( ) ) log . debug ( "Found managed environment setting in PB, will skip Connection.commit() call" ) ; } } catch ( SQLException e ) { log . error ( "Commit on underlying connection failed, try to rollback connection" , e ) ; this . localRollback ( ) ; throw new TransactionAbortedException ( "Commit on connection failed" , e ) ; } finally { this . isInLocalTransaction = false ; restoreAutoCommitState ( ) ; this . releaseConnection ( ) ; } }
Call commit on the underlying connection.