JBoss Community

client side socket timeout

created by Mayank Mittal in JBoss Remoting - View the full discussion

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;

    }

Reply to this message by going to Community

Start a new discussion in JBoss Remoting at Community