// Initialize drools environment stuff
Environment env = createEnvironment(context);
KnowledgeBase kbase = initializeKnowledgeBase(simpleRule);
StatefulKnowledgeSession commandKSession = InfinispanKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );
SingleSessionCommandService commandService = (SingleSessionCommandService) ((CommandBasedStatefulKnowledgeSession) commandKSession).getCommandService();
InfinispanPersistenceContextManager jpm = (InfinispanPersistenceContextManager) getValueOfField("jpm", commandService);
jpm.getApplicationScopedPersistenceContext();
@SuppressWarnings("unchecked")
Cache<String, EntityHolder> cache = (Cache<String, EntityHolder>) getValueOfField("appScopedCache", jpm);