Re: ConcurrentModificationException while closing consumer

2009-02-11 Thread Gary Tully
heckForComodification(LinkedList.java:617) >>>>>>>at java.util.LinkedList$ListItr.next(LinkedList.java:552) >>>>>>>at >>>>>>> org.apache.activemq.ActiveMQMessageConsumer.dispose(ActiveMQMessageConsumer.java:66

Re: ConcurrentModificationException while closing consumer

2009-02-11 Thread bonnyr
each new >>>>>>>> message. These messages >>>>>>>> are then processed by the consumer thread. The consumer thread >>>>>>>> then >>>>>>>> decides >>>>>>>> to close the connection >>

Re: ConcurrentModificationException while closing consumer

2009-02-10 Thread Rob Davies
r not synchronising access to this collection? If it's not a bug then how should the consumer be disconnected? Cheers, Bonny -- View this message in context: http://www.nabble.com/ConcurrentModificationException-while-closing-consumer-tp21867250p21867250.html Sent from the ActiveMQ - User ma

Re: ConcurrentModificationException while closing consumer

2009-02-10 Thread bonnyr
t;>>> .activemq >>>>>> .ActiveMQMessageConsumer.close(ActiveMQMessageConsumer.java:583) >>>>>> at >>>>>> com.xxx.app..AMsgQueueConsumer.doClose(AMsgQueueConsumer.java:351) >>>>>> at com.xxx.

Re: ConcurrentModificationException while closing consumer

2009-02-10 Thread bonnyr
at com.xxx.app.AMsgQueueConsumer.suspend >>>>>> >>>>>> ... snip ... >>>>>> >>>>>> [/code] >>>>>> >>>>>> This happens because AMQ is busy delivering messages and there is a >>

Re: ConcurrentModificationException while closing consumer

2009-02-10 Thread Gary Tully
> However, wouldn't static analysis of the code be sufficient in this case? > The code segment above is the only thing that is not protected by > synchronization, whilst > every other use of this collection is. > Static analysis can identify the problem and the fix, but it doesn't protect the cha

Re: ConcurrentModificationException while closing consumer

2009-02-10 Thread Gary Tully
n in exactly one place (everywhere else >>>>> it >>>>> is...) which is executing the >>>>> following code (in the dispose method): >>>>> [code] >>>>> ... snip ... >>>>>if (session.isClientAcknowledge()) { &g

Re: ConcurrentModificationException while closing consumer

2009-02-09 Thread Rob Davies
the explicit iterator calls, but...) Is this an ommission or is there a reason for not synchronising access to this collection? If it's not a bug then how should the consumer be disconnected? Cheers, Bonny -- View this message in context: http://www.nabble.com/ConcurrentModificationEx

Re: ConcurrentModificationException while closing consumer

2009-02-09 Thread Rob Davies
eers, Bonny -- View this message in context: http://www.nabble.com/ConcurrentModificationException-while-closing-consumer-tp21867250p21867250.html Sent from the ActiveMQ - User mailing list archive at Nabble.com. -- http://blog.garytully.com Open Source SOA http://FUSESource.com -- V

Re: ConcurrentModificationException while closing consumer

2009-02-09 Thread bonnyr
... >>>> [/code] >>>> >>>> Since the code iterates over the collection, and the iterator checks >>>> for >>>> modifications to the underlying collection, and since the AMQ message >>>> delivery thread has managed to sn

Re: ConcurrentModificationException while closing consumer

2009-02-09 Thread Gary Tully
the problem >>> occurs (it could be that >>> the for syntax hides the explicit iterator calls, but...) >>> >>> >>> Is this an ommission or is there a reason for not synchronising access to >>> this collection? If it's not a bug >>> then how should the consumer be disconnected? >>> >>> Cheers, >>> >>> Bonny >>> -- >>> View this message in context: >>> http://www.nabble.com/ConcurrentModificationException-while-closing-consumer-tp21867250p21867250.html >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >>> >>> >> >> >> >> -- >> http://blog.garytully.com >> >> Open Source SOA >> http://FUSESource.com >> >> > > -- > View this message in context: > http://www.nabble.com/ConcurrentModificationException-while-closing-consumer-tp21867250p21907669.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source SOA http://FUSESource.com

Re: ConcurrentModificationException while closing consumer

2009-02-08 Thread bonnyr
[/code] >> >> Since the code iterates over the collection, and the iterator checks for >> modifications to the underlying collection, and since the AMQ message >> delivery thread has managed to sneak in a couple more messages >> while the consumer thread attempted to close the c

Re: ConcurrentModificationException while closing consumer

2009-02-06 Thread Gary Tully
for not synchronising access to > this collection? If it's not a bug > then how should the consumer be disconnected? > > Cheers, > > Bonny > -- > View this message in context: > http://www.nabble.com/ConcurrentModificationException-while-closing-consumer-tp21867250p21867250.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. > > -- http://blog.garytully.com Open Source SOA http://FUSESource.com

ConcurrentModificationException while closing consumer

2009-02-05 Thread bonnyr
this collection? If it's not a bug then how should the consumer be disconnected? Cheers, Bonny -- View this message in context: http://www.nabble.com/ConcurrentModificationException-while-closing-consumer-tp21867251p21867251.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.

ConcurrentModificationException while closing consumer

2009-02-05 Thread bonnyr
this collection? If it's not a bug then how should the consumer be disconnected? Cheers, Bonny -- View this message in context: http://www.nabble.com/ConcurrentModificationException-while-closing-consumer-tp21867250p21867250.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.