Schlagwort-Archive: apache

Blocking system.exit in osgi (Part II)

After failing the last time I did some more research on how to get the security manager enabled.
Lukily I found some discussion about this issue on a mailinglist.
I resolved this issue at least with the equinox framework. The Felix didn’t work yet. I will do some more in depth research on this later on.

Now how do we get this SecurityManager running with the Equinox OSGi Container?
We need another parameter specialized for Equinox. So we end up with a file that has the following entries:


The critical entries are set in the${karaf.base}/etc/all.policy

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.

Apache Karaf 2.1.0 is out

Hey, again there is a new version of Apache Karaf out. And again I did provide some patches:

  1. KARAF-125 – This was an issue with the webconsole, no patch provided
  2. KARAF-138 – provided patch after I already provided parts of the logic in 2.0
  3. KARAF-145 – Found an issue with the startup properies and how they are partially re-used. Added a „quick“-patch wich was used for „inspiration“ 🙂