Not sure why DriverManager::setLoginTimeout() does not work ...
I tried to look for it in the code for java.sqlDriverManager class
but DriverManagers does not seem to do anything with loginTimeout
which is being set.
DriverManager is class which is implemented by Sun or respective
JVM vendor and not by JDBC driver vendor.
As far as INFORMIXCONTIME is concerned ,
there seems to be a bug in informix JDBC driver.
This bug is likely to be fixed in upcoming release of JDBC driver
(JDBC 2.21.JC6 .. mostly)
As of now , INFORMIXCONTIME sets the time between
connection attempts rather than setting connection time out.
You can use INFORMIXCONRETRY to set number of times
you want the JDBC driver to attempt establishing a connection before it
throws exception , when a connection is attempted.
For example , if INFORMIXCONRETRY is 5 and
INFORMIXCONTIME is 10 ,
on calling DriverManager.getConnection()
JDBC driver will atempt to open a connection .
suppoe first attempt fails because of whatever reason ,
(something like server too busy to accept new connections)
JDBC driver shall wait for 10 sec and retry connection.
JDBC driver shall do same for 5 times with interval of
10 sec before it throws an exception regarding not being able to
open a connection.