Hi Rob- That's interesting- I guess I never thought to check if the other OSGi containers supported fragments. But it's been forever since I've played with any of them besides equinox- I guess I can look around on mailing lists or something.
I guess another option for Restlet-OSGi strategy would be for Restlet to offer a configuration option to turn off the ServiceLoader scanning (maybe it already supports this? not sure), and then to essentially require those of us in OSGi land to manually call the extension registration methods for those extensions we need. This might be slightly inconvenient, and would require our app code to declare a specific dependency on extension modules, and would still be a problem from a bundle dynamics perspective, but it would at least be specific and remove the "surprise" factor. Jerome, just to clarify things: I really think that there are serious problems with using a BundleActivator as the restlet module currently uses. It makes it impossible to use Restlet as a library bundle (in other words, one can't write a bundle which simply declares restlet import-package manifest entries, instead one has to treat restlet like a mini application, and make sure it's started before any client code accesses it). Additionally, as currently written, the BundelActivator code scans current bundles and listens for INSTALLED events, but never _un_registers any handlers. This means that if a bundle that provides a restlet extension were to be stopped and re-started, or refreshed, that the original (stale) helpers would still be there, and that new duplicate ones would get added. There's all sorts of bad things that might happen in those cases, depending on how the helpers are implemented, and what sort of long-lived state/threads they might contain. The only situation in which the behavior of the current Activator works correctly would be if we treated the OSGi environment the same way we treat standard application deployments, which is to stop and restart the whole stack whenever anything changes. Since avoiding this is one of the main goals of OSGi, that is certainly not desirable! -Dave Fogel On Tue, Aug 11, 2009 at 11:42 AM, Rob Heittman<[email protected]> wrote: > At one point I was given to understand that Equinox was the only OSGi > framework that yet understood fragments. I'd be worried about going the ... ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2382676

