Hi, I have question if it is possible with WAS support for enterprise OSGi application to manipulate bundles inside running application. I mean from my observation was that there was always need to deploy new version of EBA and when I add composite bundle the application is restarted.
I would like to dynamically add bundle to application, start it causing service registration and stop causing de-registration. All without restarting the whole application.
Is it possible?
Not necessarily straightforward and simple.
Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
Pinned topic Bundle manipulation on running application
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Graham_Charters 100000UY5C14 Posts
Re: Bundle manipulation on running application2013-01-15T07:59:31ZThis is the accepted answer. This is the accepted answer.Hi,
The use case you describe is what application extension using composites is intended for. There are occasion where the application will restart when adding and removing extensions, but if you know what these are then they can be avoided. Applications restart when using extensions if adding or removing the extensions changes the package or service imports into the application. If you make sure your extensions use the same packages (at the same version ranges) and services as the application then the application should not restart. If you need to use new packages and services, then you can include them in the composite content to avoid the restart. The occasion where you can't avoid a restart is if the package your composite needs is provided by WebSphere and your application is not already using it. If you know ahead of time that a composite will need the API, then you can add a dummy bundle to the application to import it.
I hope this helps. If you follow these guidelines and find your app is still restarting, please post and we'll try to get to the bottom of what's going on.