-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Emma Wansbrough wrote:
Hi,
I am having major problems with persistant database connections on a resident process in java.


My database connection url looks like this:

jdbc:mysql://balti/log?autoReconnect=true&user=root&password=pineapple

But it does not appear to be reconnecting because if I go into /etc/my.cnf and set variable wait_timout to be 3 seconds or so I get the usual java Communication Link exception, meaning the the connection has gone idle and no attempt has been made to reconnect.
the version I am using is mysql-connector-java-3.0.6-stable.


Another curious factor is that the wait_timout applies to my java connections but not when I run mysql as root.

Why is this?

The mysql version is mysql-max-4.0.9-gamma-pc-linux-i686

The most disturbing thing is that the url autoReconnect seems to not be working.
Emma.


Have you read the README that comes with Connector/J 3.0.6? The autoReconnect behavior has changed:

"Fail-over only happens when the connection is in a autoCommit(true) state, because fail-over can not happen reliably when a transaction is in progress. Most good application servers and connection pools
set autoCommit to 'true' at the end of every transaction/connection use."


-Mark


- -- MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/


For technical support contracts, visit https://order.mysql.com/?ref=mmma

    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
        <___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+bj5ptvXNTca6JD8RAmXHAKCrKByD3CVmmbHvF/FA0EL+r11bywCfYj4b
fZp6fi41h0NNlm4b5CtJIzo=
=Sext
-----END PGP SIGNATURE-----


--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reply via email to