activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SuoNayi (JIRA)" <>
Subject [jira] [Commented] (AMQ-4225) PooledConnectionFactory should track Session checkouts and close associated resources
Date Mon, 17 Dec 2012 13:30:19 GMT


SuoNayi commented on AMQ-4225:

Ok, We are in agreement now.
The pooled connection shoud track the consumers it creates and close the consumers when the
close method is called.

> PooledConnectionFactory should track Session checkouts and close associated resources
> -------------------------------------------------------------------------------------
>                 Key: AMQ-4225
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Improvement
>    Affects Versions: 5.7.0
>            Reporter: Raul Kripalani
> When the user's code closes a Connection checked out from the pool, I would expect activemq-pool
to close Sessions, MessageConsumers and MessageProducers that were created from it. 
> Unfortunately, activemq-pool only cleans up Sessions on Connection.close() when no one
else is referencing the Connection (referenceCount == 0). 
> This makes Sessions, Consumers and Producers outlive the code that actually uses them,
thus leading to increased resource consumption and messages being trapped in prefetch buffers
that are no longer monitored.
> Instead, we should keep track of the Sessions that were created from each specific Connection
checkout, and close them when the borrowed Connection is closed.
> Otherwise we bump into situations like [SPR-10092|]
when using Spring's DefaultMessageListenerContainer. In some cases DMLC "forgets" to explicitly
close MessageConsumers and Sessions, even though Connections are always closed, but the pool
doesn't take care of cleaning up associated sessions.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message