Hi, What is your Pooing Utility?
Generally, JDBC Connection is TCP/IP's Socket. After the Socket has been disconnected, we can not detect it by JDBC interface. So, we have to detect it before we return a Connection to the client. Please see a source of my util class for Pooling, below. :-) -------------------------------------------------------- [ Pseudo Code of My Connection Pooling Util Class ] public Connection getConnection() { put out 'Connection' as conn from pool; try { conn.setAutoCommit(false); conn.setAutoCommit(true); } catch(Excepion e) { Oh, it seems that conn has a problem!! discard conn which was putted out; create a new Connection, and return it; } it seems that conn has No Problem!! return conn; } -------------------------------------------------------- Thanks. Sylvain Hamel wrote: > > IDE : JBuilder 4 prof > > I am using pooling in order to optimize database access. When everybody > leaves the office for the weekend all my connection timeout. This is > expected except I would like my connection pool to be able to test > connections before passing them back to the requester. Whats the best way to > do this? Cant say I like sending a (context dependent) query to the database > because it makes my class not re-usable across applications. -- TAKAHASHI, Tomohiro --------------------------------------------------------------------- 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