Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Security Manager + Virgo
Security Manager + Virgo [message #905385] Thu, 30 August 2012 05:33 Go to previous message
eugene rabii is currently offline eugene rabii
Messages: 13
Registered: February 2012
Junior Member
Environment : Java 6; virgo-3.5.0.RELEASE.

The problem: I am trying to block calls fro OSGi bundles to System.exit. From plain Java, this is very easy. Extend the SecurityManager, override a method and done!

Well, now Virgo Smile. Here is the class:

private static class BlockExit extends SecurityManager {
@Override
public void checkExit(int status){
throw new UnsupportedOperationException("Not Allowed!");
}
}

And inside the start from BundleActivator:

System.setSecurityManager(new BlockExit());

Seems pretty straightforward, but it's not working. There are A LOT of exceptions in log, mainly:

xception in thread "[Timer] - Main Queue Handler" java.lang.IllegalArgumentException: java.security.AccessCo
ntrolException: access denied (org.osgi.framework.ServicePermission (service.id=8) get)


And most recent: Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)


Is there a way to use the security manager in Virgo?

Thank You,
Eugene,
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:plans
Next Topic:ConditionalPermissionAdmin not working
Goto Forum:
  


Current Time: Wed May 22 05:21:56 EDT 2013

Powered by FUDForum. Page generated in 0.01702 seconds