heckForComodification(LinkedList.java:617)
>>>>>>>at java.util.LinkedList$ListItr.next(LinkedList.java:552)
>>>>>>>at
>>>>>>> org.apache.activemq.ActiveMQMessageConsumer.dispose(ActiveMQMessageConsumer.java:66
each new
>>>>>>>> message. These messages
>>>>>>>> are then processed by the consumer thread. The consumer thread
>>>>>>>> then
>>>>>>>> decides
>>>>>>>> to close the connection
>>
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
t;>>> .activemq
>>>>>> .ActiveMQMessageConsumer.close(ActiveMQMessageConsumer.java:583)
>>>>>> at
>>>>>> com.xxx.app..AMsgQueueConsumer.doClose(AMsgQueueConsumer.java:351)
>>>>>> at com.xxx.
at com.xxx.app.AMsgQueueConsumer.suspend
>>>>>>
>>>>>> ... snip ...
>>>>>>
>>>>>> [/code]
>>>>>>
>>>>>> This happens because AMQ is busy delivering messages and there is a
>>
> 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
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
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
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
...
>>>> [/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
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
[/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
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
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.
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.
15 matches
Mail list logo