Hi John,
Thank for tracking this down. It's now begining to make more sense.
Could you open up a jira with the information that you've provided so
far? http://issues.apache.org/activemq/browse/AMQ
I'm working on a fix now.. would you be able to help me test it?
On 4/4/06, John Pederzolli <[EMAIL PROTECTED]> wrote:
>
> I have continued trying to solve this bug, and am currently running AMQ 4.0
> RC2.
>
> I found what seems to be the source of the infinite loop - in
> MessageDispatchChannel.java, in the method dequeueNoWait (line 91):
>
> public MessageDispatch dequeueNoWait() {
> synchronized (mutex) {
> if (closed || !running || list.isEmpty()) {
> return null;
> }
> return (MessageDispatch) list.removeFirst();
> }
> }
>
> The thread that keeps on spinning has values of closed=false, running=false,
> and a nonEmpty list. With those values, a null is returned up to the run()
> method of ActiveMqSession.java (line 640), causing it do do nothing and then
> finally up to ServerSessionImpl.java's run() method (line 156) where in the
> finally block the following code that is responsible for breaking out of the
> while loop (line 170):
>
> finally {
> InboundContextSupport.unregister(this);
> log.debug("run loop end");
> synchronized (runControlMutex) {
> // This endpoint may have gone stale due to error
> if( stale) {
> runningFlag = false;
> pool.removeFromPool(this);
> break;
> }
> if( !session.hasUncomsumedMessages() ) {
> runningFlag = false;
> pool.returnToPool(this);
> break;
> }
> }
>
> Neither break statement is hit since the endpoint is not stale and it has
> unconsumed messages - and the infinite loop begins.
>
> I am not familiar enough with the code to say their is a bug in any of the
> classes I just mentioned or there is an external class which is causing the
> problem. Do you have any insight into this? I am more than willing to assist
> or give additional debug information if needed.
>
> - John
>
>
> --
> View this message in context:
> http://www.nabble.com/AMQ-3.2-Spring-Jencks-POJO-and-XA-Transactions-t1337311.html#a3747724
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>
--
Regards,
Hiram