0 Replies Latest reply on May 18, 2006 2:46 AM by carstor

    Registering RMI service to an external registry

    carstor

      Hi,

      I'm trying to set up a communication between my JBoss server and some Windows Mobile devices running a IBM J9 VM with RMI-OP. As the RMI-OP doesn't support javax.naming.* and JNDI I'm trying to register my services on an external rmi-registry listening on port 24445. But unfortunally this doesn't work: when I try to bind the service to the registry I get a java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader). Any ideas how I can use RMI services without JNDI? Any attempts with setting Properties() did fail so far.

      Here's the code:

      if (System.getSecurityManager() == null) {
       System.setSecurityManager(new RMISecurityManager());
      }
      
      try {
       PdaRmiComm obj = new PdaRmiComm();
       Naming.rebind("rmi://localhost:24445/PdaRmiServer", obj);
      } catch (Exception e) {
       System.err.println("err: " + e.getMessage());
       e.printStackTrace();
      }
      


      Thanks for any help,

      Carsten.