1 Reply Latest reply on Apr 14, 2006 1:09 PM by hongtish

    RMI and JBoss

    russ dannerr Newbie

      Ok I have searched the web and doc for my answer so I dont feel too bad asking, but I really need some clearification on the matter.

      I see that JBoss supports RMI over many protocols (JRMP/IIOP/HTTP)

      I am assuming that by default

      IIOP is port 1098
      JRMP is port 4444

      If I have a traditional set of stubs/skeletons can I do a Naming.bind("//server:4444/name",refRemoteObj); with Jboss?

      I dont see this in the documentation anywhere. Maybe RMI/JRMP use is either discouraged or taken for granted. Can anyone help out here?

        • 1. Re: RMI and JBoss
          hongtish Newbie

          this is my way. Maybe you can try it

          import java.util.*;
          import javax.naming.*;
          
          public class FileServer
          {
           public static void main(String argv[])
           {
           try {
           //System.setSecurityManager(new RMISecurityManager());
           Properties properties = new Properties();
           properties.put(Context.INITIAL_CONTEXT_FACTORY,
           "org.jnp.interfaces.NamingContextFactory");
           properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
           properties.put(Context.PROVIDER_URL, "jnp://localhost:1099");
           InitialContext ctx = new InitialContext(properties);
           ctx.rebind("rmi/FileTransfer", new FileTransferImpl());
           //FileTransferImpl --> rmi implement class
          
           } catch(Exception e) {
           e.printStackTrace();
           }
           }
          }