How to stop bundles at the time of startup. | Community
Skip to main content
Rama_Atmakur
Level 2
October 16, 2015
Solved

How to stop bundles at the time of startup.

  • October 16, 2015
  • 1 reply
  • 916 views

Hi,

    We want to disable some OOTB bundles that come with AEM5.6.1 like social bundles which we dont use in our code. In general what would be the best approach to stop the bundles at the time of startup other than going to apache felix console and stopping it manually. Remember that we have 300 servers to do the same activity and manual approach is not feasible.

And also any document/link which specifies how the bundles are deployed. The reason for this is becuase as I notice there are several ways that a bundle gets deployed in to AEM5.61 world.

1. Framework bundles which load automatically from the WEB-INF of aem.war

2. Bundles loading when a content package is deployed.

How does the sling/CQ/felix know what bundles to deploy?

 

Regards

Rama.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

Hi Rama,

I know you guys have good deployment infra structure. So just uninstall the bundles that are not required through package instead of stopping everytime.  There by it is just onetime work & simple one.  Agree you have to cautious especially with hotfix or service pack installation. 

Coming to original question create an OSGi service that uses the Sling StartupListener API to find out when startup is finished, and at that point look for the affected bundles based on a configurable list and stop them.  The osgi api has all the details require to stop the bundle. 

Thanks,
Sham

1 reply

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

Hi Rama,

I know you guys have good deployment infra structure. So just uninstall the bundles that are not required through package instead of stopping everytime.  There by it is just onetime work & simple one.  Agree you have to cautious especially with hotfix or service pack installation. 

Coming to original question create an OSGi service that uses the Sling StartupListener API to find out when startup is finished, and at that point look for the affected bundles based on a configurable list and stop them.  The osgi api has all the details require to stop the bundle. 

Thanks,
Sham