Expand my Community achievements bar.

SOLVED

Bundle Never Reactive or Reinstalled.

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 9

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 9

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

Avatar

Level 10

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.