protected void initTransactionManager() {
if(transactionManager == null){
if(transactionManagerJndiName == null || transactionManagerJndiName.length() == 0) {
throw new ProcessEngineException("Property 'transactionManager' is null and 'transactionManagerJndiName' is not set. \n " +
"Please set either the 'transactionManager' property or the 'transactionManagerJndiName' property.");
}
try {
transactionManager = (TransactionManager) new InitialContext().lookup(transactionManagerJndiName);
} catch(NamingException e) {
throw new ProcessEngineException("Cannot lookup Jta TransactionManager in JNDI using name '"+transactionManagerJndiName+"'.", e);
}
}
}