On Fri, May 14, 2010 at 11:18 AM, Rickard Öberg <[email protected]> wrote: > On 2010-05-13 22.06, Niclas Hedhman wrote: >> >> Yes, this is a long-term goal in my book... that a Module can fully >> reside in one bundle and do a reload on such. Think we would need a >> long whiteboard session to figure out what would be required to change >> in Qi4j for that to work, and that in a OSGi-agnostic way... > > My short-term goal is to simply have one bundle with the > application-assembler, calling assemblers in the various bundles. Then, when > all bundles are deployed the application-bundle should get deployed, and > instantiate the application. When a bundle gets removed, the > application-assembler bundle gets removed, because of the dependency > (right?). When the bundle becomes available again, the application goes up. > > Does that sound about right?
Ok, that means that when the "plugin bundle" (the one that is being worked on/updated) is reloaded all other bundles which has a package dependency on that bundle will be stopped (but not unloaded), so it is critical that those bundles drops all references to objects of the affected types, otherwise the classes won't be released and replaced by new ones. Once the new classes has been loaded and resolved all affected bundles will be restarted. For a Qi4j application, if you kill the QI4jRuntime in the 'master assembler' it should mean a clean reload, except for any threads started by the app. Cheers -- Niclas Hedhman, Software Developer http://www.qi4j.org - New Energy for Java I live here; http://tinyurl.com/2qq9er I work here; http://tinyurl.com/2ymelc I relax here; http://tinyurl.com/2cgsug _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

