Currently the FromRepository read all the mails respooling them first ,
and then delete the mail in a second cycle.
So it will not work correctly if you call FromRepository twice.
And about locking the repository.retrieve method does not lock messages.
To support multiple concurrent calls we should change it to use
spoolrepository's accept method and to delete messages one at a time.
Otherwise adding a lock/delete should help...
Stefano
[EMAIL PROTECTED] wrote:
Hi,
I have a question about FromRepository and respooling messages from a queue.
I wonder what happens when a FromRespository is triggered multiple times.
Let's say I would like to respool messages from a specific directory.
Somehow the FromRepository has to be 'triggered' to start respooling. What
happens if I 'trigger' the FromRepository mailet again while the mailet is
respooling the messages? Because of the multithreaded nature of James I
would assume that another thread can call service() again while another
thread is respooling the messages. Messages are removed from the repository
when the complete respooling is finished. Isn't it possible that the second
thread starts sending some of the messages for a second time because
repository.list() still returns the message sent by the first thread?
Regards
Martijn Brinkers
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]