activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <>
Subject Re: [Old issue] Memory leak after stop web application in Tomcat
Date Wed, 18 Jul 2012 13:25:19 GMT
Two suggestions:

introduce a DisposableBean to call the static shutdown methods on amq
so that they don't occur too early. Calling them from the main app
stop is too early as they will stop a close from being successful.

something like:
public class Shutdown implements DisposableBean {
    private static final Logger log = LoggerFactory.getLogger(Shutdown.class);

    public void destroy() throws Exception {"Doing amq static shutdown");
        try {
        } finally {

and add to your context like: <bean id="shutdown" class="" />

Also ensure that every call to getConnection has a corresponding call
to close, even if the call to connection pool stop has this covered,
it may be that some interaction causes a close from pool.stop to clash
and fail. But in that case I would expect to see something to that
effect in the log.

On 18 July 2012 06:32, liny <> wrote:
> Hi gtully:
> I changed to use 5.7-SNAPSHOT and did below in
> But still not work for me.
> Did ActiveMQ call AbstractInactivityMonitor#stopMonitorThreads while
> Connection#close?
> Or anything missing?
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at


View raw message