You could probably solve the callback problem by launching a separate
thread to call the start method (although it's an interesting challenge to
make sure that this, too, does not execute too soon). However

> I want to use start/stop, because I want the bundles out of memory when
> stopped. I don’t want objects to linger in memory when not used.

Stopping a bundle does not cause it to be removed from memory. References
to service objects based on the bundle will no longer be valid, but the
service objects themselves will only be eligible for garbage collection
when the last consumer has the grace to discard any references it has to
that object.

Good luck,

Chris


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to