[
http://issues.apache.org/jira/browse/JAMES-486?page=comments#action_12411923 ]
Stefano Bagnara commented on JAMES-486:
---------------------------------------
1) I see this code:
m.setErrorMessage(0 + "");
m.setLastUpdated(new Date());
Imho the best way is to set the error message to error message -1, and NOT
updated the lastupdated.
This will add exactly 1 retry (done now) to the queued mail, otherwise you
restart the queuing from the beginning.
2) Yes, if you lock you MUST also unlock (or delete), so:
if (m.getState().equals(Mail.ERROR)) {
....
} else {
spoolRepository.unlock(key);
}
3) The delete already unlocks:
spoolRepository.remove(key);
spoolRepository.unlock(key);
synchronized (spoolRepository) {
spoolRepository.notify();
}
The unlock method could be removed.
Furthermore the notify should not be called: the notify must be called only
when you know you applied changes that will create new work for the spooling
threads: deleting a message does not need a spool thread to do anything, so we
don't need to notify it.
> Spool managing commands for remote manager
> ------------------------------------------
>
> Key: JAMES-486
> URL: http://issues.apache.org/jira/browse/JAMES-486
> Project: James
> Type: New Feature
> Components: Remote Manager
> Reporter: Norman Maurer
> Assignee: Norman Maurer
> Fix For: 2.4.0
> Attachments: RemoteDelivery-retry-fix.patch, RemoteManHandler.diff,
> RemoteManager-SpoolManagement.patch
>
> Spool managing commands for remote manager - first proposal for review
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]