System.setProperty("java.security.policy", "D:\\Work\\NEW MRS Online\\Code\\Test_RuleEngine\\bin\\no.policy");
if (System.getSecurityManager() == null)
System.setSecurityManager(new RMISecurityManager());
Properties env = new Properties();
env.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.setProperty("java.naming.provider.url", "localhost:1099");
env.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
InitialContext context = new InitialContext(env);
RuleEngineRemote mrs = (RuleEngineRemote)context.lookup("RuleEngineEAR/RuleEngine/remote");
Content of no.policy file:
grant { permission java.security.AllPermission; };
No comments:
Post a Comment