Map<TransactionId, Transaction> transactionMap = context.getTransactions();
Transaction transaction = transactionMap.get(xid);
if (transaction != null) {
throw new JMSException("Transaction '" + xid + "' has already been started.");
}
transaction = new LocalTransaction(transactionStore, (LocalTransactionId)xid, context);
transactionMap.put(xid, transaction);
}
}