@Override
    public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "commit (SPI)");

        try {
            processCommit();
        } catch (HeuristicHazardException hhe) {
            // Only throw heuristic hazard in the one phase case
            // modify the heuristic - note JTA 1.0.1 errata implies this may be reconsidered one day
            final HeuristicMixedException hme = new HeuristicMixedException(hhe.getLocalizedMessage());
            hme.initCause(hhe.getCause()); //Set the cause to be the cause of the HeuristicHazardException
            if (tc.isEntryEnabled())
                Tr.exit(tc, "commit", hme);
            throw hme;
        } finally {
            if (tc.isEntryEnabled())
                Tr.exit(tc, "commit (SPI)");
        }
    }
@ Override public void commit ( ) throws RollbackException , HeuristicMixedException , HeuristicRollbackException , SecurityException , IllegalStateException , SystemException { if ( tc . isEntryEnabled ( ) ) Tr . entry ( tc , "commit (SPI)" ) ; try { processCommit ( ) ; } catch ( HeuristicHazardException hhe ) { final HeuristicMixedException hme = new HeuristicMixedException ( hhe . getLocalizedMessage ( ) ) ; hme . initCause ( hhe . getCause ( ) ) ; if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "commit" , hme ) ; throw hme ; } finally { if ( tc . isEntryEnabled ( ) ) Tr . exit ( tc , "commit (SPI)" ) ; } }
Commit the transation associated with the target Transaction object

This call should only be made from the root.

@exception RollbackException Thrown to indicate that
the transaction has been rolled back rather than committed.

@exception HeuristicMixedException Thrown to indicate that a heuristic
mix decision was made.

@exception HeuristicRollbackException Thrown to indicate that a
heuristic rollback decision was made.

@exception SecurityException Thrown to indicate that the thread is
not allowed to commit the transaction.

@exception IllegalStateException Thrown if the transaction in the
target object is inactive.

@exception SystemException Thrown if the transaction manager
encounters an unexpected error condition