cayenne-commits mailing list archives

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


Andrus Adamchik commented on CAY-1462:

> But we are using Cayenne's pool. And it is enough good even it's simple...
> Looks like DBCP has something like 1 and 2 variants... Some day I will try it...

It is very easy to switch. (Change to DBCPDataSourceFactory in the modeler and provide a config

> But still don't see anything bad in improving of Cayenn's pool. :) 

yeah, definitely if you want to work in this direction, you are more than welcome. Let me
give you some history though to explain where I am coming from with my suggestion. Prior to
Cayenne ca. 1.2 we advertised Cayenne connection pool as a standalone DataSource solution,
but then relaized that a DataSource is something external and opaque to Cayenne, and from
an ORM perspective it makes no sense for us to try to compete with other more advanced implementations
(and a serious production-quality DataSource can get really complex, just look at home many
parameters DBCP supports)... So we sort of limited the number of features that Cayenne pool
supports (so that we can support them well without getting too distracted), and recommend
DBCP for any advanced use.

> 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