6 Replies Latest reply on Apr 23, 2011 1:42 PM by Ronald Sigal

    client side socket timeout

    Mayank Mittal Novice

      Hello ,

           I've an EJB3 application running on Jboss Server and a RMI client to invoke its methods. No i've an issue in setting up time out for specific calls.

      I want to set up the time out to 1 sec. I've used follwing contest properties to set up the timeout but are not working.


      private static Properties getContextProperties ()


              final Properties props = new Properties();

              props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");

              props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

              props.put("jnp.sotimeout", "1000");

              props.put("jsun.rmi.transport.tcp.readTimeout", "10");

              props.put("socketTimeout", "1000");       

              props.put("jnp.timeout", "1000");

              props.put("timeout", "1000");



              if (mActiveNetworkAddress != null)


                  props.put(NamingContext.JNP_LOCAL_ADDRESS, mActiveNetworkAddress);




              // for HA-JNDI lookup

               props.put(Context.PROVIDER_URL, "Server01:1100,Server02:1100");

              props.put(NamingContext.JNP_DISABLE_DISCOVERY, "true");



              return props;