[ openjms-Bugs-1192265 ] Message Lost in multi-processor envirement

"SourceForge.net" <[email protected]> Fri, 29 Apr 2005 01:22:43 -0700
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
Bugs item #1192265, was opened at 2005-04-29 08:22
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1192265&group_id=54559

Category: server
Group: v0.7.6.1
Status: Open
Resolution: None
Priority: 5
Submitted By: shyan (shyan)
Assigned to: Nobody/Anonymous (nobody)
Summary: Message Lost in multi-processor envirement

Initial Comment:
I found message lost sometime in multi-processor 
envirement.
I test and simulate this situation and get the following 
result.

Sometime messages get the same sequenceNumber.

so message handle have same sequenceNumber in
PMDVector and persistent storage(DB).
When cunsumer receive message,the message handle 
removed from  PMDVector.

Because MessageHandleComparator only compare 
three attributes
(priority,acceptedtime,sequencedNumber) ,so if the 
three attributes equal,the handle is equal.

Two elements(or more) is removed from PMDVector.

So some messages lost,but thoses message still exists 
in database.

You can send two messages to server,and shutdown 
server.
Then modify two record's acceptedtime and 
sequenceedNumber to same value.
Start server and receive all message,you can only get 
one message,and the lost message is still exist in db.

I have a solution to fix this problem.
Add messageid conditition  in 
MessageHandleComparator.compare method to avoid 
compare confuse,because messageid is always unique.

The attache file is my patch.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1192265&group_id=54559


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20