code: public MultiTransactionStatus getTransaction(TransactionDefinition definition) throws TransactionException {
  
  		MultiTransactionStatus mts = new MultiTransactionStatus(transactionManagers.get(0));
  
  		if (!synchronizationManager.isSynchronizationActive() && canCreateTransaction(definition)) {
  			synchronizationManager.initSynchronization();
  			mts.setNewSynchronization();
  		}
  
  		try {
  
  			for (PlatformTransactionManager transactionManager : transactionManagers) {
  				mts.registerTransactionManager(definition, transactionManager);
  			}
  
  		} catch (Exception ex) {
  
  			Map<PlatformTransactionManager, TransactionStatus> transactionStatuses = mts.getTransactionStatuses();
  
  			for (PlatformTransactionManager transactionManager : transactionManagers) {
  				try {
  					if (transactionStatuses.get(transactionManager) != null) {
  						transactionManager.rollback(transactionStatuses.get(transactionManager));
  					}
  				} catch (Exception ex2) {
  					LOGGER.warn("Rollback exception (" + transactionManager + ") " + ex2.getMessage(), ex2);
  				}
  			}
  
  			if (mts.isNewSynchronization()) {
  				synchronizationManager.clearSynchronization();
  			}
  
  			throw new CannotCreateTransactionException(ex.getMessage(), ex);
  		}
  
  		return mts;
  	}
docs: /*
  (non-Javadoc)
  @see org.springframework.transaction.PlatformTransactionManager#getTransaction(org.springframework.transaction.TransactionDefinition)