activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Singer <>
Subject RE: current thread's class loader is changed during onMessage of
Date Tue, 26 Apr 2011 08:32:33 GMT
Hi, something to add:
The flow in AMQ:
ThreadPoolExecutor: run
PoolTaskRunner: run
PoolTaskRunner: runTask
ClientMessageListener: onMessage

When I debug the PoolTaskRunner:run method when the onMessage is called,
It does: runningThread = Thread.currentThread();
And there I see that the runningThread has a wrong class loader already.

-----Original Message-----
From: Michal Singer 
Sent: ג 26 אפריל 2011 10:24
Subject: current thread's class loader is changed during onMessage of 

Hi, I have a problem which will reproduce on AMQ 5.2.0 as well as 5.5.0 and I assume on every
I am running a multi process environment, where the client and server processes communicate
through ActiveMQ.
Client is on top of tomcat 6.0.18, server is on top of Spring 2.5.6. I am using 2 web application
contexts in tomcat.

I am implementing on the client side the MessageListener onMessage methor, which uses ActiveMQObjectMessage
object in runtime.
Some times after restart, I see that when entering onMessage,

The Thread.currentThread.getContextLoader() shows a wrong class loader, that of the other
web context.
This causes many problem.

it seems like the thread pool of the AMQ is somehow mixed and so the thread entered on onMessage
was somehow wrong.

Any ideas what this means? What should be done?

Michal Singer

Expand Networks
6 Hanechoshet Street
Tel Aviv, Israel 69710

Voice:   +972.3.766.8039
Expand View<>

View raw message