Bundle Never Reactive or Reinstalled. | Community
Skip to main content
Level 2
October 16, 2015
Solved

Bundle Never Reactive or Reinstalled.

  • October 16, 2015
  • 2 replies
  • 850 views

Hi ,

Are there any parameters where you can set a  bundle never to getting reactivated or re-installed during multiple deploys. The reason why we are looking into an option is one of our bundle has a memory leakissue, just wanted an interim solution where i can set a bundle like a supreme bundle which can never be re-deployed.

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 Pawan-Gupta

Hello,

Not sure how much the below information will be useful in your use case

 

1. You can make that bundle as fragment as i see your use case which will help you not to worry about bundle activation as fragment does not have bundle activator or life cycle

http://wiki.osgi.org/wiki/Fragment

But if you don't want to be fragment then

1. When you create a new bundle in CQ repository you can also define the Activator class (implements BundleActivator) which manages the life cycle of that bundle. 

2. It provides two methods start() and stop() with parameter as BundleContext which gives you information related to the bundle.

3. Now based on above information if you can figure out the earlier status of that bundle (Not very sure as i did not try it) it may help you to stop the reactivation of bundle

but i don't think you can stop installation (as installation is different than to its activation)

The best way i can suggest you to manage these through your bundle build process (via eliminating the build of that specific bundle) instead of trying to manage it from inside the bundle

 

Thanks,

Pawan

2 replies

Pawan-Gupta
Pawan-GuptaAccepted solution
Level 8
October 16, 2015

Hello,

Not sure how much the below information will be useful in your use case

 

1. You can make that bundle as fragment as i see your use case which will help you not to worry about bundle activation as fragment does not have bundle activator or life cycle

http://wiki.osgi.org/wiki/Fragment

But if you don't want to be fragment then

1. When you create a new bundle in CQ repository you can also define the Activator class (implements BundleActivator) which manages the life cycle of that bundle. 

2. It provides two methods start() and stop() with parameter as BundleContext which gives you information related to the bundle.

3. Now based on above information if you can figure out the earlier status of that bundle (Not very sure as i did not try it) it may help you to stop the reactivation of bundle

but i don't think you can stop installation (as installation is different than to its activation)

The best way i can suggest you to manage these through your bundle build process (via eliminating the build of that specific bundle) instead of trying to manage it from inside the bundle

 

Thanks,

Pawan

smacdonald2008
Level 10
October 16, 2015

You can manually turn off a bundle (de-activate) using the Adobe CQ Web Console:

http://localhost:4502/system/console/configMgr

I am not aware of how to do this by setting parameters.