Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-3447

Lazy loading runtime engine can cause not unlock the kie session id during disposal

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.10.1.GA
    • 7.7.1.GA, 7.9.1.GA
    • jBPM Core
    • 2021 Week 04-06 (from Jan 25), 2021 Week 07-09 (from Feb 15)

    Description

      Workaround
      -Dorg.jbpm.rm.engine.eager=true

      When the pattern

             RuntimeManager manager = RuntimeManagerRegistry.get().getManager(deploymentUnit.getIdentifier());
              RuntimeEngine engine = manager.getRuntimeEngine(ProcessInstanceIdContext.get(pid));
              // no op so the runtime is not being init when lazy loading is used
              manager.disposeRuntimeEngine(engine);
      

      in this case with lazy init the dipose engine won't happen as kie session id is not being loaded yet.

      Before this was masked by the fact CanDispose was loading the kie session id before hand:
      https://github.com/kiegroup/jbpm/blob/7.44.0.Final/jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/impl/AbstractRuntimeManager.java#L201

      so in here
      https://github.com/kiegroup/jbpm/blob/7.44.0.Final/jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/impl/PerCaseRuntimeManager.java#L247
      https://github.com/kiegroup/jbpm/blob/7.44.0.Final/jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/impl/PerCaseRuntimeManager.java#L250
      had always value

      because of this other bug:
      https://github.com/kiegroup/jbpm/blob/7.44.0.Final/jbpm-runtime-manager/src/main/java/org/jbpm/runtime/manager/impl/PerCaseRuntimeManager.java#L269

      not release with right kie session id, I had to move the kie session id before the try-catch block... causing this scenario not to work.

      Attachments

        Issue Links

          Activity

            People

              elguardian@gmail.com Enrique González Martínez (Inactive)
              rhn-support-abhumbe Abhijit Humbe
              Antonio Fernandez Alhambra Antonio Fernandez Alhambra (Inactive)
              Antonio Fernandez Alhambra Antonio Fernandez Alhambra (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: