Issue Details (XML | Word | Printable)

Key: AMQ-1165
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Hiram Chirino
Reporter: Dain Sundstrom
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

RegionBroker resets JMS Timestamp

Created: 21/Feb/07 04:26 PM   Updated: 26/Feb/07 05:35 PM
Component/s: None
Affects Version/s: 4.1.0
Fix Version/s: 4.1.1, 5.0.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Timestamp.patch 2007-02-21 04:26 PM Dain Sundstrom 5 kB

Patch Info: Patch Available


 Description  « Hide
The RegionBroker contains the following logic, which overwrites the JMSTimestamp. FWIU, the message timestamp should be set once at send and never changed by the broker.

if (message.getTimestamp() > 0 && (message.getBrokerPath() == null || message.getBrokerPath().length == 0)) { //timestamp not been disabled and has not passed through a network message.setTimestamp(System.currentTimeMillis()); }

Attached is a simple test case and patch that changes the '>' in the if statement above to '<='. I'm not sure if that is the proper fix, but it did make my problem go away.



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
Jason Dillon added a comment - 22/Feb/07 10:00 PM
Has anyone had a chance to look at this? This is a blocking issue for release of Geronimo 1.2 due to TCK certification...

511463 by  Hiram Chirino (2 files)
25/Feb/07 12:29 AM (32 months, 18 days ago)
Fix for AMQ-1165

Made the broker side timestamping 'feature' (which is a JMS spec bug) and optional broker plugin that can be enabled if a user really wants to have the broker timestamping behaviour.

branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java 511463 history download (+47) new
branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java 511463 history download (+0 -4) diffs

Hiram Chirino made changes - 25/Feb/07 12:29 AM
Field Original Value New Value
Assignee Hiram Chirino [ chirino ]
Hiram Chirino added a comment - 25/Feb/07 12:31 AM
That logic was put in place as a "Feature".. In rev 511463 in 4.1 trunk I have now made that "Feature" optional so that we don't break JMS compliance.

Repository Revision Date User Message
AMQ #511464 Sun Feb 25 00:34:49 PST 2007 chirino Backported fix to AMQ-1165
Files Changed
ADD /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java (from /activemq/branches/activemq-4.1/activemq-core/src/main/java/org/apache/activemq/broker/util/TimeStampingBrokerPlugin.java)
MODIFY /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/region/RegionBroker.java

Hiram Chirino added a comment - 25/Feb/07 12:35 AM
also fixed in trunk rev 511464

Hiram Chirino made changes - 25/Feb/07 12:35 AM
Fix Version/s 4.2.0 [ 11712 ]
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 4.1.1 [ 11800 ]
Dain Sundstrom added a comment - 26/Feb/07 02:39 PM
I think you forgot to commit the test case.

512103 by  Hiram Chirino (1 file)
26/Feb/07 05:32 PM (32 months, 17 days ago)
512104 by  Hiram Chirino (1 file)
26/Feb/07 05:33 PM (32 months, 17 days ago)
Repository Revision Date User Message
AMQ #512104 Mon Feb 26 17:33:59 PST 2007 chirino Adding test provided in AMQ-1165
Files Changed
ADD /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java (from /activemq/branches/activemq-4.1/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java)

Hiram Chirino added a comment - 26/Feb/07 05:35 PM
Your right.. corrected in rev 512102 and 512104

Create crucible review for all 4 changesets in