public static String COMMAND_ENTITY_MANAGER_FACTORY = "drools.persistence.test.EntityManagerFactory";
@Test
public void testSingleSessionCommandServiceAndJtaTransactionManagerTogether() throws Exception {
// Initialize drools environment stuff
Environment env = createEnvironment(context);
KnowledgeBase kbase = initializeKnowledgeBase(simpleRule);
StatefulKnowledgeSession commandKSession = JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );
commandKSession.getId(); // initialize CSEM
SingleSessionCommandService commandService = (SingleSessionCommandService) ((CommandBasedStatefulKnowledgeSession) commandKSession).getCommandService();
JpaPersistenceContextManager jpm = (JpaPersistenceContextManager) getValueOfField("jpm", commandService);