if (transactionDemarcation == null)
throw new TransactionManagerAcquireException ("Problem obtaining transaction manager demarcation configuration");
String demarcationMode = transactionDemarcation.getMode();
TransactionManager transactionManager = transactionDemarcation.getTransactionManager();
if (transactionManager == null) {
if (!demarcationMode.equals(LocalTransactionManagerFactory.NAME))
throw new TransactionManagerAcquireException ("Problem obtaining required transaction manager configuration.");
} else {
String mode = transactionManager.getName();
if (mode == null)
throw new TransactionManagerAcquireException ("Attribute MODE for <transaction-manager> required");
TransactionManagerFactory factory = getTransactionManagerFactory(mode);
if (factory == null)
throw new TransactionManagerAcquireException ("Invalid value for MODE. Transaction manager factory with MODE = " +
mode + "does not exist");
Properties properties = new Properties();
Enumeration parameters = transactionManager.enumerateParam();
while (parameters.hasMoreElements()) {
Param param = (Param) parameters.nextElement();
properties.put(param.getName(), param.getValue());
}