0 Replies Latest reply on Nov 8, 2004 5:17 AM by schokoladenhase

    JNDI Problem on Applet->SFSB

    schokoladenhase

      Hi everyone...
      Im quite desperate trying to enable a JNDI lookup for several days now.
      I have a signed applet contacting a stateful session bean.
      Since Applets are only allowed to load code from the machine they came from the specific code is like:

      Properties props = System.getProperties();
      props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory" );
      props.setProperty("java.naming.provider.url", this.getCodeBase().getHost());
      GTCSessionHome home =
      (GTCSessionHome) PortableRemoteObject.narrow(new InitialContext(props).lookup("GTCSession"),GTCSessionHome.class);
      


      The code works fine as long as i have it in a LAN environment, but as soon as i set it up on a remote server the lookup fails. I opened the standard TCP Ports for JNDI, Tomcat and RMI (1098,1099,4444,8080).
      I heard there are some problems with the NAT Translation, but i dont know how to bypass them, since i have to get the URL with a this.getCodeBase().getHost() due to security limitations.

      Looking up a stateful session bean on the internet should be working somehow... any hints would be appreciated.