Sahoo wrote:
I shall look closely at my test case, but I am a bit surprised, because if the test were incorrect, how was I seeing classes being gced while using other implementations?
This is the basic flow of my test case:
1. I start the framework from a Java class.
2. I have listed a bunch of bundle names in the autostart property, so framework installs and starts them automatically. 3. The last bundle (I call it the test bundle) is a special one, which when starts, stops all the other bundles except itself and the framework bundle. The test bundle does not depend on any of the other bundles. I do see bundles getting uninstalled. The framework should not depend on any any of these bundles, right? 4. If I understand correctly, when a bundle is uninstalled, its exported packages are eligible for gc if there is no other bundle which uses the bundle (section 4.3.11 of r4 spec). To ensure that I take care of dependencies among bundles, I stop the bundles in the reverse order (I am assuming the bundle id is strictly increasing). Is this the correct way of doing things?

In my test case, the framework is responsible for starting the bundles (I use autostart property to start the bundles). Could it be the problem?

Regarding (4), if there are dependencies among bundles, then the bundles will not be garbage collected until a refresh occurs. Felix does not walk the transitive dependencies of all bundles upon an uninstall to see if all dependencies are also uninstalled. When an uninstall occurs, Felix checks to see if anyone is dependent on the bundle being uninstalled. If no one is, then it automatically refreshes that bundle so that it is gone completely and can be gc'd. If there are any dependencies any dependencies, then this auto-refresh will not happen, thus you will need to do a manual refresh.

-> richard


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to