String way? Do you mean Spring way? Maybe you can explain a bit more in detail?
Sorry. Correct "a Spring way".
1. I use Spring DM to start a bundle in Servicemix.
2. The bundle makes connections/references to external resources (ex. Database Connection).
3. From the ServiceMix Console the bundle is uninstalled.
4. Problem: External resources are left open.
On a ServiceMix Console bundle uninstalled/stop is there a programmatic way of getting control before exiting?
There are AFAIR some listeners your bundle can implement and define so the osgi container can callback when the bundle is being uninstalled/stopped etc.
Sorry. Not sure what "AFAIR" is?
So the latest spring-osgi version supports service reference listeners? Do you have (can share) an Spring Bean example of how to implement one of these listeners?
Thanks in advance,