On Friday 23 February 2007 04:03, Enrique Rodriguez wrote: > However, the bundling process simply repackages > the library jar to include bundle metadata. With the bundle metadata, > the jar can now be added to an OSGi runtime, but no code is actively > started. Consumers of the bundle would need to be aware of the issue > you mention.
I disagree. This kind of thinking is why there is so much problems in the Java world at large. Everyone works on stuff getting started and never clean up the mess behind. Moving the problem to the client bundles doesn't help and creates even more problems. BundleA uses commons-httpclient. It takes note of you "issue" and shutdownAll() as noted. Eveything is fine. BundleB does the same thing. Now, deploy both on the same framework, and how??? Demanding that the commons-httpclient is only "valid" if it is started is IMHO a reasonable reqruirement, and put in a clean up in the stop() method is obviously needed. This is of course true for all libraries creating threads and registering other global resources, so this 'bulk wrapping' is IMHO not necessarily a good thing, unless one look into the consequences. Cheers Niclas