commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hassan Sajjad (JIRA)" <>
Subject [jira] Commented: (POOL-151) Eviction thread is able to remove (destroy) in-flight (borrowed) objects
Date Wed, 11 Nov 2009 10:46:40 GMT


Hassan Sajjad commented on POOL-151:

# The [above pool settings |]
are for this test only. 
In the real env. the 2 eviction params ({{timeBetweenEvictionRunsMillis}} and {{minEvictableIdleTimeMillis}})
change to 10 minutes.
# {{factory.passivateObject()}} and {{factory.activateObject()}} are empty:
    public void activateObject(Object o) throws Exception


    public void passivateObject(Object o) throws Exception
# {{factory.destroyObject()}} is the only place that closes the session. Pretty certain this
is triggered by the Eviction thread, because:
## If you disable Eviction on the pool, there is no closing of the sessions and the issue
is no longer there! The sessions then become vulnerable to other longevity related issues
such as timeouts due to long period of idleness etc.
## See the thread id associated with close calls '{{Timer-0}}' - seems to be a time scheduled
job like the Eviction.

> Eviction thread is able to remove (destroy) in-flight (borrowed) objects
> ------------------------------------------------------------------------
>                 Key: POOL-151
>                 URL:
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: 1.5.3
>            Reporter: Hassan Sajjad
>            Priority: Blocker
> Under high concurrent use, the eviction thread can temper with an in-use object from
the pool, potentially causing catastrophic results, as illustrate in the below log from our
use. Note the object - in our case JMSSession is closed in-flight (after message send but
before commit), causing the commit to fail with {{javax.jms.IllegalStateException: MQJMS1024:
session closed}} error.
> {noformat}
> 2009-10-12 15:08:40,254 DEBUG [asyncDelivery59] Borrowed session
for jms connector 
> 2009-10-12 15:08:40,341 DEBUG [Timer-0] Physically closing
for connector 
> 2009-10-12 15:08:40,669 DEBUG [asyncDelivery59] Returning session
for jms conn
> ector
> 2009-10-12 15:08:40,433 ERROR [asyncDelivery59] Exception caught while committing transaction
> {noformat}

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

View raw message