0 Replies Latest reply on Mar 25, 2004 1:26 PM by trackingroi.com

    home.create() fails from remote machine - Timeout

    trackingroi.com

      I've seen a couple posts regarding this type of error but their resolutions haven't solved our issue though. We're testing our install using a very simple example EJB. The client looks like this (not complete code):

       // preparing properties for constructing an InitialContext object
       Properties properties = new Properties();
       properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
       properties.put(Context.PROVIDER_URL, "jnp://69.57.141.196:1099");
       try {
       // Get an initial context
       InitialContext jndiContext = new InitialContext(properties);
       System.out.println("Got context");
      
       // Get a reference to the Bean
       Object ref = jndiContext.lookup("StringProcessor");
       System.out.println("Got reference");
      
       // Get a reference from this to the Bean's Home interface
       StringProcessorHome home = (StringProcessorHome)
       PortableRemoteObject.narrow (ref, StringProcessorHome.class);
       System.out.println("Got home");
       // Create an Adder object from the Home interface
       StringProcessor sp = home.create();
      


      When we run, we always get:

      Got context
      Got reference
      Got home
      java.rmi.ConnectException: Connection refused to host: 69.57.141.196; nested exc
      eption is:
      java.net.ConnectException: Connection timed out: connect


      Nothing is quick except the "Got context" line. Got reference and Got home take a number of seconds between them then the failure takes maybe 20 seconds.

      I've tried using the -blocalhost option on startup, and -bREALIP on startup neither of which has helped. They both actually cause exceptions on startup like address already in use, etc.

      Thank you very much for your help...