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);
}
else {
throw new RuntimeDroolsException("JPAKnowledgeService is not instance of: " + JPAKnowledgeProviderLocalClient.class.getName());
}