Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-34537

As a tools developer, I would like to be able to call ServiceBuilder multiple times using same JVM process

Details

    Description

      Tools like Liferay IDE may want to invoke ServiceBuilder multiple times within same jvm, rather than launching a new jvm to execute it for better performance.

      For this reason, I create a reenterable servicebuilder entrance.
      The reenterable logic is guarded by:
      1) System properties reset to prevent system properties pollution.
      2) New ClassLoader loading and running to ensure all classes are freshly loaded for each run and can be properly destroyed.
      3) New Thread executing to prevent ThreadLocal pollution.

      These are the best I can do to simulate a brand new clear env for each run as you can get from a new jvm. But there are still plenty possible ways ServiceBuilder can leave over garbages causing pollution. For those cases we will have to adjust ServiceBuilder's code to do things in a cleaner way. This is all we can do as an invoker.

      Attachments

        Activity

          People

            david.truong David Truong
            shuyang.zhou Shuyang Zhou
            Kiyoshi Lee Kiyoshi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Packages

                Version Package
                6.2.0 CE M5