I'm using JBoss 4.0.1 sp1. I developed an application that downloaded from JBoss host via JWS (Java Web Start) connect to the same JBOSS host. When I try to connect to the host from the downloaded application I get:
java.security.AccessControlException: access denied (java.net.SocketPermission <HOST IP ADDRESS> connect,resolve) The code to connect the server (EJBHOME Factory Pattern) is: String serverAddress = null; try { BasicService bs = (BasicService) ServiceManager.lookup ("javax.jnlp.BasicService"); serverAddress = bs.getCodeBase().getHost(); logger.info("Java Web Start is initialized - server address is: " + serverAddress + " ..."); } catch (UnavailableServiceException e) { serverAddress = "localhost";logger.warn("Java Web Start is not initialized - assuming localhost is the the server address..."); } Properties p = new Properties(); p.pu(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces"); p.put(Context.PROVIDER_URL, serverAddress); logger.info("Creating the initial ctx... "); ctx = new InitialContext(p); ... anEJBHome = (EJBHome) PortableRemoteObject.narrow(ctx .lookup(homeClass.getName()), homeClass); I DON'T WANT TO GIVE TO MY DOWNLOADED APPLICATION FULL PERMISSION, I DON't WANT TO CHANGE POLICY FILE WHERE THE APPLICATION RUN, because the application only need to access to the server wich it was downloaded and JWS specs assures that "Network connections are enabled only to the host from which the JAR files are downloaded". Damiano Altomare. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3870163#3870163 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3870163 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user