Uploaded image for project: 'Opencast'
  1. MH-13190

Refactor JpaGroupRoleProvider into "production code" (aka. getService resulted in a cycle)

    Details

      Description

      This ticket addresses top class level comment in JpaGroupRoleProvider regarding refactoring out the REST endpoint from the core JpaGroupRoleProvider service to clean the code and attempt to avoid a race-condition load collision.

      "Since this is not intended to be production code, the REST concerns have not be factored into a separate class. Feel free to refactor." 1

      And the module load race condition SCR-vs-JAXRS tug of war exception 2.

      1 https://github.com/opencast/opencast/blob/r/5.x/modules/userdirectory/src/main/java/org/opencastproject/userdirectory/JpaGroupRoleProvider.java#L99-L111

      2 Load race condition with dependencies triggered by JaxRsServiceTracker.addingService regarding opencast-userdirectory. Consistently about the time the "/groups" endpoint is being registered.

      ERROR | (?:?) - FrameworkEvent ERROR - opencast-userdirectory
      org.osgi.framework.ServiceException: ServiceFactory.getService() resulted in a cycle.
              at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:307)[org.apache.felix.framework-5.6.4.jar:]
              at org.apache.felix.framework.Felix.getService(Felix.java:3721)[org.apache.felix.framework-5.6.4.jar:]
              at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)[org.apache.felix.framework-5.6.4.jar:]
              at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)[154:org.apache.felix.scr:2.0.10]
              at org.apache.felix.scr.impl.inject.BindMethod.getServiceObject(BindMethod.java:651)[154:org.apache.felix.scr:2.0.10]
              at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2201)[154:org.apache.felix.scr:2.0.10]
              at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.prebind(DependencyManager.java:403)[154:org.apache.felix.scr:2.0.10]
              at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1520)[154:org.apache.felix.scr:2.0.10]
              at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:1006)[154:org.apache.felix.scr:2.0.10]
              at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:859)[154:org.apache.felix.scr:2.0.10]
              at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:823)[154:org.apache.felix.scr:2.0.10]
              at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)[org.apache.felix.framework-5.6.4.jar:]
              at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)[org.apache.felix.framework-5.6.4.jar:]
      ....
              at org.opencastproject.kernel.rest.RestPublisher$JaxRsServiceTracker.addingService(RestPublisher.java:412)[60:opencast-kernel:5.0.0.SNAPSHOT]
      ...
      

        TestRail: Results

          Attachments

            Activity

              People

              • Assignee:
                karen_dolan Karen Dolan
                Reporter:
                karen_dolan Karen Dolan
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  TestRail: Cases