> From: Jerry Malcolm [mailto:2ndgenfi...@gmail.com] 
> Subject: Re: connection autoReconnect?

> Basically, TC grabs a handful of connections and
> opens them up.

The Tomcat JDBC pool (not sure about the commons one) opens up whatever is 
configured for initialSize.

> Then when an app needs one, a random connection is provided
> from the pool.

Don't bet on it being random.  It may well have changed from a round-robin to a 
LIFO mechanism (that would explain your symptoms).

> in TC 5, if the luck of the draw gave me a closed connection,
> autoReconnect would fire it back up

No - you would get the exception first, then the connection would be recreated. 
 Likely you never got to the point where autoReconnect kicked in.

> But for some reason now, I've got to write code to check each 
> connection I get back to see if it's connected.

I don't think anyone has suggested anything of the sort.  Turn off 
autoReconnect and use testOnBorrow instead.  No changes are needed in your 
code, just your configuration.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to