A bit more info on what I'm doing:
So first the PriorityLinkedList implementation will be changed to use
ConcurrentLinkedQueue's instead of Lists. Doing this means that the server consumer
can iterate over the queue without a comod exception being thrown. The only drawback is we
can't add to the head so for now i'm just making a clone of the list.
All browsing will be done using current consumer functionality. I'll add a new flag to
specify what kind a consumer is, i.e. a browser or not. If a Consumer is a browser the it
will not add itself to the queue to receive messages, instead it will iterate over the
whole queue sending messages until there are no more and then notify the client consumer,
the caveat here being the normal flow control methods. The client consumer will just read
messages of its internal buffer until it is notified that there is none left. Doing it
this way means a browser has the performance of normal consumer for the sake of just a
couple of extra methods added, we also now see changes to the queue rather than just a
static snapshot. It also means we can delete all the browser classes as they are not
needed any more.
One problem that we have is to do with paging. Since messages are never routed to the
queue until they are depaged a browser will never be able to browse over all messages once
paging has occurred. But this is no different to what we have now.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182135#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...