When JNP utilizes a connection or attempts to make a connection to a server, there is no timeout value as there is with RMI. Also, the Socket class used for this connection is the standard SDK java.net.Socket, which does not have a connection timeout option as of SDK1.3. An attempt to connect to a bad address can take up to 4 minutes to timeout, and 15 minutes to timeout established connections gone dead on a default install of Solaris8. So a new SocketOpener support object is used that spawns a timer thread that will timeout connections that have not been established in a period of time. So if either a jnp.connect.timeout or jnp.sotimeout value has been set in the Context.environment (usually via the jndi.properties file), this NamingContext object will use the SocketOpener to create the socket, enforce a connect timeout, and set the soTimeout. If neither value is set, then it NamingContext will save the resources and simply call the java.net.Socket constructor.
There is a patch for org.jnp.interfaces.NamingContext and a new org.jnp.interfaces.SocketOpener. Two new values can be added to the jndi.properties file: np.connect.timeout and jnp.sotimeout (both in ms).