3 messages in com.mysql.lists.javaRe: Timeout and Connector/J| From | Sent On | Attachments |
|---|---|---|
| Chambon | 06 Oct 2003 07:31 | |
| Mark Matthews | 06 Oct 2003 14:12 | |
| Chambon | 07 Oct 2003 04:46 |
| Subject: | Re: Timeout and Connector/J![]() |
|---|---|
| From: | Mark Matthews (ma...@mysql.com) |
| Date: | 10/06/2003 02:12:24 PM |
| List: | com.mysql.lists.java |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Chambon wrote:
Hi,
I am using Mysql 3.23.x with JDBC Connector/J 3.0 under Solaris 8
I try to use timeout and I got some problems. Does setLoginTimeout (from DriverManager) and/or setQueryTimeout (from Statement) works ?
LoginTimeout is not implemented (although connectTimeout should work 'about' the same).
Connector/J can not support setQueryTimeout(), because MySQL has no graceful way of terminating a query after some specified period of time has elapsed (yet, this is coming in 4.1 or 5.0).
I try to set these values but I got no timeout (exception) while 'simulating' network and/or mysql lock. Nothing happens, My test program remains hang.
I also try to use connectTimeout and socketTimeout with properties but it seems that only socketTimeout works; connectTimeout doesn't works even with Java 1.4(as recommended in the
doc.)
Hmmm..What platform, exactly? It works with JDK-1.4.0, 1.4.1 and 1.4.2 on my machine (windows). Can you step through com.mysql.jdbc.StandardSocketFactory. connect(String host, Properties props) with a debugger, and see if it is actually setting the connect timeout on the socket?
Regards,
-Mark - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 557 2388 www.mysql.com
Are you MySQL Certified? http://www.mysql.com/certification/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQE/gdrOtvXNTca6JD8RAiabAKCwZdB4qpFI7w/FV6XKr9shSbujLQCfdC30 2J6j4GGyKJSDF8AF8Ai0Wb4= =X1iP -----END PGP SIGNATURE-----




