code: public void commit(TransactionStatus status) throws TransactionException {
  
  		MultiTransactionStatus multiTransactionStatus = (MultiTransactionStatus) status;
  
  		boolean commit = true;
  		Exception commitException = null;
  		PlatformTransactionManager commitExceptionTransactionManager = null;
  
  		for (PlatformTransactionManager transactionManager : reverse(transactionManagers)) {
  
  			if (commit) {
  
  				try {
  					multiTransactionStatus.commit(transactionManager);
  				} catch (Exception ex) {
  					commit = false;
  					commitException = ex;
  					commitExceptionTransactionManager = transactionManager;
  				}
  
  			} else {
  
  				// after unsucessfull commit we must try to rollback remaining transaction managers
  
  				try {
  					multiTransactionStatus.rollback(transactionManager);
  				} catch (Exception ex) {
  					LOGGER.warn("Rollback exception (after commit) (" + transactionManager + ") " + ex.getMessage(), ex);
  				}
  			}
  		}
  
  		if (multiTransactionStatus.isNewSynchronization()) {
  			synchronizationManager.clearSynchronization();
  		}
  
  		if (commitException != null) {
  			boolean firstTransactionManagerFailed = commitExceptionTransactionManager == getLastTransactionManager();
  			int transactionState = firstTransactionManagerFailed ? HeuristicCompletionException.STATE_ROLLED_BACK
  					: HeuristicCompletionException.STATE_MIXED;
  			throw new HeuristicCompletionException(transactionState, commitException);
  		}
  	}
docs: /*
  (non-Javadoc)
  @see org.springframework.transaction.PlatformTransactionManager#commit(org.springframework.transaction.TransactionStatus)