private void createOrResumeXidTransaction(final XidTransactionID xidTransactionID) throws Exception {
final TransactionManager transactionManager = this.ejbRemoteTransactionsRepository.getTransactionManager();
final Transaction alreadyCreatedTx = this.ejbRemoteTransactionsRepository.getImportedTransaction(xidTransactionID);
if (alreadyCreatedTx != null) {
// resume the already created tx
transactionManager.resume(alreadyCreatedTx);
} else {
// begin a new tx and add it to the tx repository
// TODO: Fix the tx timeout (which currently is passed as 300 seconds)
final Transaction newSubOrdinateTx = this.ejbRemoteTransactionsRepository.importTransaction(xidTransactionID, 300);
// associate this tx with the thread