cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Evgeny Ryabitskiy (JIRA)" <>
Subject [jira] Commented: (CAY-1462) Refreshing connections in DataPool after DB restart
Date Mon, 12 Jul 2010 09:46:49 GMT


Evgeny Ryabitskiy commented on CAY-1462:

Thx, for your detailed explanation! Now it's much clear.

Guess we need to make some list of "Best Practice" to explain there solutions for such common

I will try DBCP. 

One disadvantage is that there is validationQuery param that contains only one DB specific
For example I can use "select 1 from dual" for Oracle but it won't work on db2 or ms sql....

Still need some wrapping to determine DB type for validation query. 

> Refreshing connections in DataPool after DB restart
> ---------------------------------------------------
>                 Key: CAY-1462
>                 URL:
>             Project: Cayenne
>          Issue Type: Improvement
>    Affects Versions: 2.0 branch, 3.0
>         Environment: MS SQL
>            Reporter: Evgeny Ryabitskiy
>            Assignee: Evgeny Ryabitskiy
>             Fix For: 2.0.5, 3.1M1
> Problem can be simulated after restart of SQL Server.
> So connection in my pool become "dead". Only thing that helps: restart my appllication.
> I wold like to have some mechanism to validate pooled connections and refresh them.
> Possible solutions:
> 1) validate before give connection from pool
> 2) asynchronous thread for validation.
> 3) Generate event for pool on such exceptions (to validate and refresh connections)
> 1- is more reliable but not sure how it will influence on performance...
> 2 - at least something... but can look like some not understandable magic... :)
> 3 - need some code investigation... 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message