6 Replies Latest reply on Jan 22, 2014 1:20 AM by Xiang Lai

    Is PerRequestRuntimeManager helpful?

    Xiang Lai Newbie

      I am doing some performance testing on jBPM 6.0.0.Final. I have finished parts of work - a setup without database, but i met scale problems in the setup with database (Oracle11g).

      As the suggestion from Chapter 5. Core Engine API, I use PerRequestRuntimeManager both for with db and without db setup.

      For without db case, it works well; But for with db case, it is not scale at all.

       

      Some Code Pieces:

      KieServices ks = KieServices.Factory.get();

      KieContainer kContainer = ks.getKieClasspathContainer();

      kbase = kContainer.getKieBase("kbase");

      emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa");

      builder = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder().entityManagerFactory(emf).knowledgeBase(kbase);

      manager =  RuntimeManagerFactory.Factory.get().newPerRequestRuntimeManager(builder.get(), "jbpm.benchmark");

      runtimeEngine = manager.getRuntimeEngine(null);

       

      I create manager when application startup, and create/dispose runtime engine per request.

      Any advice ? The performance can not scale when I increase request threads and tps is very low.

       

      /Xiang