3 Replies Latest reply on Oct 19, 2012 10:58 AM by thomas.diesler

    Persist/control bundle state (avoid auto start)

    graben

      Hi,

       

      I have two small questions about OSGi bundle control:

       

      1. How can I avoid auto start of deployed bundles?
      2. Is there a possibility to persist bundle state over restart of JBoss OSGi in AS7?

       

      Regards,

      Benjamin

        • 1. Re: Persist/control bundle state (avoid auto start)
          thomas.diesler

          How can I avoid auto start of deployed bundles?

           

          We have various ways to do this especially for test cases. Generally however, it is one of the critical issues that we have not yet settled on how to go forward with.

          Please monitor https://issues.jboss.org/browse/AS7-3694

           

          Meanwhile, you can use the @DeploymentMarker like this

           

          @DeploymentMarker(autoStart = false)
          public class DeploymentMarkerActivatorB implements BundleActivator {
          
              @Override
              public void start(BundleContext context) throws Exception {
              }
          
              @Override
              public void stop(BundleContext context) throws Exception {
              }
          }
          

           

          Is there a possibility to persist bundle state over restart of JBoss OSGi in AS7?

           

          This should work. What version of AS7 are we talking about?

           

          The answers that I give here are in the context of 7.2.0.Alpha1, which is not yet released.

          Please build from https://github.com/jbossas/jboss-as

          1 of 1 people found this helpful
          • 2. Re: Persist/control bundle state (avoid auto start)
            graben

            Thanks for the answer. I'm actually using AS7.1.1 hoping that JBoss will deliver another 7.1.x release as community edition.

            But it seems that I really have to wait until 7.2 to get everything working I need.

             

            Benjamin

            • 3. Re: Persist/control bundle state (avoid auto start)
              thomas.diesler

              Folks like you could provide valuable feedback before the release.

              Checkout the feature list that is already available in the 7.1.2.Alpha1 codebase.