Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4861

Cannot activate OSGi subsystem with fragment bundle deployments

    XMLWordPrintable

Details

    Description

      Occurs with JBoss 7.1.2.Final (EAP) running with jbosgi-framework 1.3.0.Final
      See https://issues.jboss.org/browse/AS7-4814 for an issue in the same area. This bug here happens independently of the other.

      Having OSGi bundles, that are fragments leads to

      INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
      JBAS014775: Neue fehlende/unbefriedigte Abhängigkeiten: (this is German, in English. sth. like Missing/unresolved dependencies)
            service jbosgi.integration.PersistentBundlesHandler.COMPLETE (missing) dependents: [service jbosgi.framework.INIT]
      

      This is because when bundle is installed via

      org.jboss.osgi.framework.internal.BundleManagerPlugin.installBundle(Deployment, ServiceListener<Bundle>)

      in case of a fragment, the listener is not passed to the FragmentBundleInstalledService (BundleManagerPlugin, line 364).
      In consequence, there is no notification for this bundle in

      org.jboss.osgi.framework.util.ServiceTracker.listenerAdded(ServiceController<? extends S>)

      which leads to org.jboss.osgi.framework.util.ServiceTracker.addedNames not containing the bundle and then when org.jboss.osgi.framework.util.ServiceTracker.checkAndComplete() is invoked the check for completeness in

      org.jboss.as.osgi.service.PersistentBundlesIntegration.InitialDeploymentTracker.InitialDeploymentTracker(...).new PersistentBundlesComplete() {...}.allServicesAdded(Set<ServiceName>)

      fails due to different sizes of bundleInstallServices and trackedServices.

      I will attach a proposed patch, which resolves the issue by adding the listener also to FragmentBundleInstalledService.

      Attachments

        Activity

          People

            tdiesler@redhat.com Thomas Diesler
            r.neubauer@seeburger.de Rico Neubauer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: