[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: bug in session.rollback()
ataylor
do-not-reply at jboss.com
Fri Mar 27 08:09:57 EDT 2009
actually the error was this piece of code
| if (checkDLQ(ref))
| {
| LinkedList<MessageReference> toCancel = queueMap.get(ref.getQueue());
|
| if (toCancel == null)
| {
| toCancel = new LinkedList<MessageReference>();
|
| queueMap.put((QueueImpl)ref.getQueue(), toCancel);
| }
|
| toCancel.addFirst(ref);
| }
actually it should be
if (ref.getQueue().checkDLQ(ref))
| {
| LinkedList<MessageReference> toCancel = queueMap.get(ref.getQueue());
|
| if (toCancel == null)
| {
| toCancel = new LinkedList<MessageReference>();
|
| queueMap.put((QueueImpl)ref.getQueue(), toCancel);
| }
|
| toCancel.addFirst(ref);
| }
We always call the checkDLQ(..) method is always called for the same queue not the queue for the ref.
This explains the errors with the AddressSettings tests I'm currently writing as well.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221529#4221529
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221529
More information about the jboss-dev-forums
mailing list