Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.2.0, 2.3.0, 3.0.0
-
None
Description
Currently the MailImpl object update its own lastUpdated everytime the writeObject is called:
private void writeObject(java.io.ObjectOutputStream out) throws IOException {
lastUpdated = new Date();
out.writeObject(sender);
....
}
Imho this is NOT correct: writeObject is a serialization method. If I write an object and then I read it again I should have an equal object. THis is not the case having updated the lastUpdated.
Furthermore this is not consistent in James because writeObject is called only when storing mails in file repositories but not when storing mails in db repositories.
Currently the only places we update the date is in temporary failures of the RemoteDelivery.
In 2.3 I moved lastUpdated to the Mailet's Mail object, so we should make it clear what the usage should be and we should decide when this field is updated and when it's not updated.
Updating it in the SpoolRepository.store would make sense but we loose the ability to change the lastUpdated field and to keep track of it. So we should manage it at an higher level.
I think that we should at least remote the lastUpdate change from the writeObject.
We should also add a lastUpdated "update" when the remote delivery store messages to the outgoing spool and when spoolmanager updates messages in the spool.
Any hint on this?
Attachments
Issue Links
- is depended upon by
-
JAMES-486 Spool managing commands for remote manager
- Resolved