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

ClassLoaderPool may not ready when used in service tracker

    Details

      Description

      We were using bundle tracker to register/unregister class loader to ClassLoaderPool, so that each bundle will have its own entry in ClassLoaderPool when it is activated.

      We have some usages of ClassLoaderPool in service tracker of a service published by same bundle.

      The problem is the order, since OSGi does not guarantee the order of bundle tracker and service tracker, both of them are listeners of same event (the STARTED event when refreshing a budle), it may happen that ClassLoaderPool is not populated when it is used in service tracker.

      The solution is to change the bundle tracker's scope, make it track STARTING state which happens before service is published.

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                brian.chan Brian Chan
                Reporter:
                tina.tian Tina Tian
                Participants of an Issue:
                Recent user:
                Michael Saechang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  22 weeks, 1 day ago

                  Packages

                  Version Package
                  7.1.10 DXP FP10
                  7.1.10.2 SP2
                  7.1.3 CE GA4
                  7.1.X
                  Master