tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pid *" <...@pidster.com>
Subject Re: Login fails, then works subsequently (Tomcat 7)
Date Thu, 22 Dec 2011 08:38:33 GMT
On 21 Dec 2011, at 22:52, Chema <demablogia@gmail.com> wrote:

>> 10 to 1 you've got stale connections in your pool; first try fails, second
>> one gets a fresh connection
>
> I thought the same
>
>
> autoReconnect
> Should the driver try to re-establish stale and/or dead connections?

Nope. Like Hassan said, use a validation query. If you're using MySQL
then "/* ping */ SELECT 1" will work.


p

PS @Chema - you've been around here long enough now to know better
than to keep top-posting.


> If enabled the driver will throw an exception for a queries issued on
> a stale or dead connection, which belong to the current transaction,
> but will attempt reconnect before the next query issued on the
> connection in a new transaction. The use of this feature is not
> recommended, because it has side effects related to session state and
> data consistency when applications don't handle SQLExceptions
> properly,
>
>
> http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html
>
>
> You can implement your own realm extending DataSourceRealm and
> overriding authenticate() method with your traces . And don't forget
> to call super.authenticate().
>
> More info:
> http://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#DataSourceRealm
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


Mime
View raw message