Blocking system.exit in osgi

One thing beforehand, calling system.exit from a bundle is evil!
But even worse is a third party legacy jar calling system.exit instead of throwing exceptions. Now how do we stop this jar from doing such evil?
The only way you can do this is to use a SecurityManager preventing calls to system.exit. Wow!!!
Now how am I supposed to do something like that in an OSGi world?
This is where the security bundle of felix comes in place.