2 Replies Latest reply on Dec 15, 2001 5:06 PM by sebaseba

    in-VM calls over RMI?

    sebaseba

      Hi,

      while fixing JNDI problems I came across the following section in jndi.properties:

      # Do NOT uncomment this line as it causes in VM calls to go over
      # RMI!
      #java.naming.provider.url=localhost

      I did not see this advice *not* to uncomment anywhere else (doc or forums), and found that I could not get the Initial Context lookup to work without uncommenting the line. The JBoss doc also indicates that java.naming.provider.url has to be set to the url of the JNDI server.

      Just curious why this advice is in the file, and under what circumstances it is relevant?

      Thanks,
      Sebastian

        • 1. Re: in-VM calls over RMI?
          hchirino

          This is only true for the jndi.properties that the JBoss server instance uses. Since the naming server is running in the same vm as the JBoss server, you do not want to set the java.naming.provider.url so that you get optimized lookups. In other words, ctx.lookup() will be a direct method call on the naming server instead of it being done as a method call over a socket.

          Client obviously HAVE to set the property since they are not in the same VM that the server is in.

          • 2. Re: in-VM calls over RMI?
            sebaseba

            Thanks - this clarifies a few things :-)
            Sebastian