commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (POOL-305) Add maxAge to pool config
Date Sat, 26 Sep 2015 12:15:04 GMT

    [ https://issues.apache.org/jira/browse/POOL-305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14909233#comment-14909233
] 

Michael Osipov edited comment on POOL-305 at 9/26/15 12:14 PM:
---------------------------------------------------------------

Hi Phil, I am able to commit the stuff myself after your review.
 
Looking at the source code, tells me that I have to modify {{EvictionConfig}} and the {{DefaultEvictionPolicy}}
which will in turn tell whether this pooled object has reached its maximum age. Does my approach
sound right?
Tomcat JDBC Connection Pool has a different approach:

bq. When a connection is returned to the pool, the pool will check to see if the now - time-when-connected
> maxAge has been reached, and if so, it closes the connection rather than returning it
to the pool. 


was (Author: michael-o):
Hi Phil, I am able to commit the stuff myself after your review.
 
Looking at the source code, tells me that I have to modify {{EvictionConfig}} and the {{DefaultEvictionPolicy}}
which will in turn tell whether this pooled object has reached its maximum age. Does my approach
sound right?
Tomcat JDBC Connection Pool has this approach:

bq. When a connection is returned to the pool, the pool will check to see if the now - time-when-connected
> maxAge has been reached, and if so, it closes the connection rather than returning it
to the pool. 

> Add maxAge to pool config
> -------------------------
>
>                 Key: POOL-305
>                 URL: https://issues.apache.org/jira/browse/POOL-305
>             Project: Commons Pool
>          Issue Type: Improvement
>    Affects Versions: 2.4.2
>            Reporter: Michael Osipov
>
> In our environment, there are upper caps to session lifetime regardless how often the
session has been busy/idle. Given that an object in a pool can remain for an indefinite time
as long as it is used often enough, it may also already be invalided by the server.
> To avoid such issues, I'd like to have a {{maxAge}} property for an object, where eviction
kicks in by default. This is the very same as in the [Tomcat JDBC Connection Pool|https://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html].
> I am quite certain that this is possible with a custom eviction policy but I do think
that should be available by default.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message