You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Marcello Marangio <m....@tno.it> on 2006/03/21 10:50:25 UTC

About locking

Hi all.
I am still dealing with he locking mechanism between different instances of
james.
Just a curiosity: why use the Lock class instead of synchronizing methods? 
Am I missing something?

Cheers
Marcello


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: About locking

Posted by Stefano Bagnara <ap...@bago.org>.
Marcello Marangio wrote:
> Hi all.
> I am still dealing with he locking mechanism between different instances of
> james.
> Just a curiosity: why use the Lock class instead of synchronizing methods? 
> Am I missing something?

Because James still have the ability to loop through the mails and 
safely fail locking when a message is already being processed by other 
threads.

Look at the "lock()" code and at the code calling lock() to understand.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org