1 Reply Latest reply on Sep 8, 2014 1:36 AM by Maciej Swiderski

    Runtime Manager Types - JPAKnowledgeService

    Jimmy Pannier Newbie

      Hi,

       

      I've got the jbpm6 developper guide book but there is something that i don't understand.

       

      My question is about the way in which the sessions are created.

       

      There is a chapter explaining the manager types (with code samples).

      - Singleton Runtime Manager

      - Per Request Runtime Manager

      - Per Process Instance Runtime Manager

      ---------> With the manager you get a runtime engine and with this engine you get a session with engine.getKieSession();

       

      There is also a chapter for implementing persistence and transaction. BUT the sample code for creation session is different

       

      KieServices services = KieServices.Factory.get();

      Environment newEnv = services.newEnvironment();

      newEnv.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);

      newEnv.set(EnvironmentName.TRANSACTION_MANAGER, tm);

      KieSession session = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, newEnv);  ---> What about the runtime manager (which type) and environnement engine ?