2 Replies Latest reply on Oct 21, 2010 12:12 PM by thomas.diesler

    OSGi integration update

    thomas.diesler

      OSGi is now part of AS7 master. The OSGi subsystem starts ON_DEMAND by default and comes up when the deployment layer detects a valid OSGi bundle deployment. From the user perspective this happens when you drop a bundle in the 'deployments' folder.

       

      The subsystem can also be configured to start eagerly like this

       

      <subsystem xmlns="urn:jboss:domain:osgi:1.0" activation="eager">
      ...
      </subsystem>
      

       

      Having said above, there was however a small piece missing in the merge to master. This patch fixes it

      http://github.com/jbosgi/jboss-as/commit/7ea8d19d507360976790dfc78dd93e8ecd182cb3

       

      As always, the latest stabe OSGi integration is available at: http://github.com/jbosgi/jboss-as/tree/jbosgi

       

      cheers

      -thomas

        • 1. Re: OSGi integration update
          brian.stansberry

          Sacha Labourey reported problems building master on Window due to failures in the osgi module testsuite. I fired up my old XP machine and was able to reproduce. A snippet from the console output showing the first failure:

           

          Running org.jboss.as.osgi.xservice.BundleDependsOnLocalModuleTestCase

          09:52:23,531 INFO  [org.jboss.osgi.framework.bundle.BundleManager] (Thread-2) In

          stall bundle: system.bundle:0.0.0

          09:52:23,593 INFO  [org.jboss.as.osgi] (Thread-2) Starting OSGi Framework

          09:52:23,593 INFO  [org.jboss.osgi.framework.bundle.FrameworkState] (Thread-2) J

          BossOSGi Framework Core - 1.0.0.Alpha11

          09:52:23,640 INFO  [org.jboss.osgi.framework.plugin.internal.StartLevelPluginImp

          l] (Thread-2) Starting bundles for start level: 1

          09:52:23,640 INFO  [org.jboss.osgi.framework.bundle.FrameworkState] (Thread-2) F

          ramework started

          09:52:23,718 INFO  [org.jboss.as.deployment] (main) Activating deployment: bundl

          e1

          09:52:23,718 WARN  [org.jboss.vfs] (main) VFS was unable to set the URLStreamHan

          dlerFactory.  This will have unpredictable results

          09:52:23,781 INFO  [org.jboss.as.osgi] (Thread-2) Installing deployment: [bundle

          1:1.0.0,location=vfs:/C:/dev/jboss/jboss-as/osgi/deployments/bundle1/]

          09:52:23,796 INFO  [org.jboss.osgi.framework.bundle.BundleManager] (Thread-2) In

          stall bundle: bundle1:1.0.0

          09:52:23,828 INFO  [org.jboss.as.osgi] (Thread-2) Uninstalling deployment: [bund

          le1:1.0.0,location=vfs:/C:/dev/jboss/jboss-as/osgi/deployments/bundle1/]

          09:52:23,828 WARN  [org.jboss.osgi.deployment.deployer.SystemDeployerService] (T

          hread-2) Cannot uninstall: [bundle1:1.0.0,location=vfs:/C:/dev/jboss/jboss-as/os

          gi/deployments/bundle1/]: java.lang.IllegalStateException: Bundle uninstalled: b

          undle1:1.0.0

                  at org.jboss.osgi.framework.bundle.AbstractBundle.assertNotUninstalled(A

          bstractBundle.java:764)

                  at org.jboss.osgi.framework.bundle.AbstractBundle.uninstall(AbstractBund

          le.java:484)

                  at org.jboss.osgi.framework.bundle.AbstractUserBundle.uninstall(Abstract

          UserBundle.java:381)

                  at org.jboss.osgi.framework.bundle.BundleWrapper.uninstall(BundleWrapper

          .java:186)

                  at org.jboss.osgi.deployment.deployer.SystemDeployerService.undeployInte

          rnal(SystemDeployerService.java:142)

                  at org.jboss.osgi.deployment.deployer.SystemDeployerService.undeploy(Sys

          temDeployerService.java:73)

                  at org.jboss.osgi.framework.plugin.internal.DeployerServicePluginImpl.un

          deploy(DeployerServicePluginImpl.java:85)

                  at org.jboss.as.osgi.deployment.OSGiDeploymentService.stop(OSGiDeploymen

          tService.java:129)

                  at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceContr

          ollerImpl.java:983)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec

          utor.java:886)

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor

          .java:908)

                  at java.lang.Thread.run(Thread.java:619)

           

          Sacha said he was running 64 bit so he was presumably on a newer environment than my 2005 Windows machine. :-)

          • 2. Re: OSGi integration update
            thomas.diesler

            DavidB is currently looking into this. Please monitor https://jira.jboss.org/browse/JBAS-8543