Hi, something to add:
The flow in AMQ:
ThreadPoolExecutor: run
PoolTaskRunner: run
PoolTaskRunner: runTask
ActiveMQSessionExecutor:iterate
ActiveMQSessionExecutor:dispatch
ActiveMQSessionConumer:dispatch
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
To: users@activemq.apache.org
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 version.
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?




Thanks,
Michal Singer

Expand Networks
6 Hanechoshet Street
Tel Aviv, Israel 69710

Voice:   +972.3.766.8039
E-mail:   michal.sin...@expand.com<mailto:michal.sin...@expand.com>
Expand View
www.expand.com<http://www.expand.com/>

Reply via email to