activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raphiki (JIRA)" <>
Subject [jira] [Commented] (AMQ-4366) PooledConnectionFactory closes connections that are in use
Date Thu, 23 Feb 2017 15:48:44 GMT


Raphiki commented on AMQ-4366:

An expired connection is now not closed if used by an other thread but there is nothing preventing
the loan of an expiryConnection isn't it ?

The [connectionPool.borrow()|]
just call the expiryCheck() throught the [validateObject()|]
method but it considers the connection valid (and so reusable) if it has expired but has still
some remaining reference...

On my environment my expiryTimeout of 60 seconds is rarely reached (unless I assign a connection
for each consumer but I can't do that in production environment).

> PooledConnectionFactory closes connections that are in use
> ----------------------------------------------------------
>                 Key: AMQ-4366
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: activemq-pool
>    Affects Versions: 5.7.0, 5.8.0
>            Reporter: Petr Janata
>            Assignee: Timothy Bish
>             Fix For: 5.9.0
>         Attachments: poolConClose.diff
> {{PooledConnectionFactory}} closes connections that are still referenced and should not
be closed. Happens only when connection idle or expire time passes. Calling {{createConnection}}
after that time will invalidate the connection and all previously obtained {{Sessions}} will
behave as closed.
> Due to default 30 second idle timeout, it is likely not to cause problems when:
> * connection is continually in use
> * all {{PooledConnection}} s are borrowed at startup
> Client with session whose connection was prematurely closed will see similar stacktrace:
> {noformat}
> javax.jms.IllegalStateException: The Session is closed
>                 at org.apache.activemq.ActiveMQSession.checkClosed(
>                 at org.apache.activemq.ActiveMQSession.configureMessage(
>                 at org.apache.activemq.ActiveMQSession.createBytesMessage(
>                 at org.apache.activemq.pool.PooledSession.createBytesMessage(
> {noformat}

This message was sent by Atlassian JIRA

View raw message