2 Replies Latest reply on Jul 9, 2007 4:47 PM by Logambigai Venkat

    RMI on HTTP with PROXY

    Francesco Sighieri Newbie

      Good morning,
      i have a j2ee client (swing) and server (EJB) application and have set up jndi.properties so that rmi works via http modifying this two properties:
      java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory
      and
      java.naming.provider.url=:t.http://localhost:8080/invoker/JNDIFactory.

      The application works correctly with this configuration; however my problem is to make it work also coming through a proxy.
      I would like to know whether some properties exist to add to jndi.properties file that they allow me to set up the parameters of proxy or if exists a other solution to solve the problem.

      Thanks to everybody.

        • 1. Re: RMI on HTTP with PROXY
          Francesco Sighieri Newbie

          Good morning,
          i have find the solution.
          To make rmi work via http with in a proxy means it is sufficient to set up in client the following properties using the method "System.setProperty(String key, String value)":

          System.setProperty("http.proxySet", "true");
          System.setProperty("http.proxyHost", "host address");
          System.setProperty("http.proxyPort", "host port");

          Greetings to everybody.

          • 2. Re: RMI on HTTP with PROXY
            Logambigai Venkat Newbie

            I am using JBoss as my Application server and trying to make an RMI call from that. Facing following exception. I googled and understood that its something to do with the Java 2 security issue. I tried to overcome that using the following lines of code in my servlet(RMI client) and RMI server

            System.setProperty("java.security.policy","policy.all");
            System.setSecurityManager(new RMISecurityManager());

            where i grant AllPermissions. Even then facing the following issue. Is there some JBoss configuration which needs to be changed to get this working?

            Help Appreciated.

            java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:2000 connect,resolve)
            at java.security.AccessControlContext.checkPermission(AccessControlContext.java :264)
            at java.security.AccessController.checkPermission(AccessController.java:427)
            at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)