activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <>
Subject [jira] [Commented] (AMQ-3451) Tomcat 6.0.32 complains that ActiveMQ 5.5 doesn't shutdown a thread
Date Tue, 17 Jul 2012 09:45:35 GMT


Gary Tully commented on AMQ-3451:

@liny, thanks for that test case war. Peeking at the code, I think the problem is related
to the code in

That closes the connection, (returns them to the pool), but does not stop the connection pool.
It does however stop the executors, and this prevents the real close of the connections when
the spring context calls the custom stop destroy method. This is evident from the {{ERROR
o.a.a.transport.tcp.TcpTransport - Could not stop service: tcp://
Reason: java.util.concurrent.RejectedExecutionException}} exception.

So you can explicitly call close on the connection pool, like:
((PooledConnectionFactory) springHelper.getBean("pooledJmsFactory")).stop();
or somehow arrange it such that the calls to {{shutdown()}} are done when the spring context
is destroyed. So after the connection pool is successfully destroyed.
> Tomcat 6.0.32 complains that ActiveMQ 5.5 doesn't shutdown a thread
> -------------------------------------------------------------------
>                 Key: AMQ-3451
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.5.0
>         Environment: jdk 1.6.0_23 for Linux 64 bit, Ubuntu 11.04
> Tomcat 6.0.32
> Spring 3.0.5
>            Reporter: John Miller
>              Labels: leak, resource
> Every time when restarting web application in Tomcat Manager I get messages:
> SEVERE: The web application [/sms] appears to have started a thread named [ActiveMQ Task-3]
but has failed to stop it. This is very likely to create a memory leak.
> With every restart PermGen space is increased and finally i got OutOfMemory error for
PermGen space.
> I use Spring DefaultMessageListenerContainer, and it's shutdown method closes properly
receivers threads. What is "ActiveMQ Task-3" thread and how to close it properly ?

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


View raw message