> > the only notify is at the end of store() but there is no 
> notify at the 
> > unlock()
> 
> store() would be called elsewhere in the code to put it into 
> the next processor, and processor.service() doesn't return 
> until the processor has finished with the message.

Ok, I found the call to store() :-)
It is in the LinearProcessor: LinearProcessor will call spool.store() if the
mail.state is changed.
It could be that the notify called by that store doesn't work because the
mail is still locked when it happens, I will investigate on this.

> [...]
> If you don't call store, you won't persist the change in 
> state, which would have an impact if the server were restarted.

If you have a single linear processor with 100 mailet then the state is only
changed at the end of the processor and you restart james it will restart
the processing from the first matcher/mailets. If you have 10 processors
with 10 mailets and they are called in sequence then currently james store
the messageState at each processor change. There is more granularity in the
message state but this is not atomic anyway.

My idea is to have a single spoolThread to bring an email from the first
processor to the last one as if it were a single processor.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to