1 Reply Latest reply on Jul 13, 2009 3:19 AM by jaikiran pai

    communicate with a remote JNDI EJB3 object

    sam wun Newbie

      Hi,

      With the Calculator example in ejb3 tutorial, I can execute an ejb3 client communicate with the Calculator ejb3 bean, that is fine. But if I want to execute this Calculator client on a remote machine, how can I make change to the Calculator client java class so that it can communicate with the EJB3 object on the server side (thru JNDI)?

      Very appreciate for any suggestion.

      Thanks

        • 1. Re: communicate with a remote JNDI EJB3 object
          jaikiran pai Master

          You will find a jndi.properties in the client classpath (source code). You can edit that to point to the remote server. Here's an example:

          java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
          java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
          java.naming.provider.url=jnp://Remote-Machine-IP:1099


          Remote-Machine-IP is the IP/hostname of the remote server which hosts the EJB. 1099 is the Naming port (by default) of the remote server.