5 Replies Latest reply on Apr 7, 2005 11:06 PM by spoonman464

    JNDI available outside tje server?

    Hugo Newbie

      Hello all,

      I'm trying to call a stateless session bean's business method from outside the server it is running on. Therfore I must access the JNDI of the jboss server.
      I created a jndi.properties file with the folowing entries:

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      # Do NOT uncomment this line as it causes in VM calls to go over
      # RMI!
      java.naming.provider.url=jnp://<server-dns-shortname>:1099
      # The jnp protocol socket factory class
      jnp.socketFactory=org.jnp.interfaces.TimedSocketFactory
      # The TimedSocketFactory connection timeout in milliseconds(0 == blocking)
      jnp.timeout=1000
      # The TimedSocketFactory read timeout in milliseconds(0 == blocking)
      jnp.sotimeout=250

      however the connection gets timed out.
      After a while I got the idea to portscan (TCP) the server and to my surpise port 1099 isn't open.
      What do I have to do to make the JNDI available to remote clients?
      Can I then, somehow, restrict access to only certain clients?
      Regards,

      Hugo

      P.s. my naming config from jboss-service.xml is:

      <!-- ==================================================================== -->
      <!-- JNDI -->
      <!-- ==================================================================== -->

      <mbean code="org.jboss.naming.NamingService"
      name="jboss:service=Naming"
      xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
      <!-- The call by value mode. true if all lookups are unmarshalled using
      the caller's TCL, false if in VM lookups return the value by reference.
      -->
      <attribute name="CallByValue">false</attribute>
      <!-- The listening port for the bootstrap JNP service. Set this to -1
      to run the NamingService without the JNP invoker listening port.
      -->
      <attribute name="Port">1099</attribute>
      <!-- The bootstrap JNP server bind address. This also sets the default
      RMI service bind address. Empty == all addresses
      -->
      <attribute name="BindAddress">${jboss.bind.address}</attribute>
      <!-- The port of the RMI naming service, 0 == anonymous -->
      <attribute name="RmiPort">1098</attribute>
      <!-- The RMI service bind address. Empty == all addresses
      -->
      <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
      <!-- The thread pool service used to control the bootstrap lookups -->
      <depends optional-attribute-name="LookupPool"
      proxy-type="attribute">jboss.system:service=ThreadPool</depends>
      </mbean>

      <mbean code="org.jboss.naming.JNDIView"
      name="jboss:service=JNDIView"
      xmbean-dd="resource:xmdesc/JNDIView-xmbean.xml">
      </mbean>