You need a security manager.
Sample code:
System.setProperty("java.security.policy", "client.policy");
if (System.getSecurityManager() == null)
System.setSecurityManager(new
RMISecurityManager());
Properties env = new Properties();
// Definir las propiededes y ubicacion de busqueda de
Nombres JNDI.
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");
context = new InitialContext(env);
where the archive client.policy is in root dir and contain for example (this
exaple is totally unsecure!):
grant {
permission java.security.AllPermission;
};
Hope it helps.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3895241#3895241
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3895241
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user