environment.set(EnvironmentName.ENTITY_MANAGER_FACTORY, getJpaTemplate().getEntityManagerFactory());
if (environment.get(EnvironmentName.TRANSACTION_MANAGER) != null) {
logger.debug("overwriting environment key: " + EnvironmentName.TRANSACTION_MANAGER);
}
environment.set(EnvironmentName.TRANSACTION_MANAGER, getTransactionManager());
environment.set(EnvironmentName.GLOBALS, new MapGlobalResolver());
jpaKnowledgeServiceProvider = node.get(JPAKnowledgeFactoryService.class);
if (jpaKnowledgeServiceProvider instanceof JPAKnowledgeProviderLocalClient) {
JPAKnowledgeProviderLocalClient local = (JPAKnowledgeProviderLocalClient) jpaKnowledgeServiceProvider;
local.setCommandServiceClass(SpringSingleSessionCommandService.class);