james-server-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Charles <e...@apache.org>
Subject Re: question about blocking
Date Mon, 04 Jun 2012 08:56:21 GMT
Hi Thimothy,

James protocols layer does not block. It is built on Netty and uses NIO 
(There are OIO implementations, but they are not used in the default 
configuration).

Once the mail is received, it is spooled in a queue, so it's some kind 
of 'blocking', but on a higher level.

Your mappers are singleton and will be called for you by the 
mailetcnntainer, so you need to take care to thread-safety.

Thx, Eric


On 06/03/2012 04:20 PM, Timothy Prepscius wrote:
> Hey there,
>
> I have a question about where and if james blocks on IO.
>
> So I'm implementing a new mailbox [actually I'm modifying for now, see last message :-)].
>
> I am wondering what would be best for me to do:
>
> Either:
>
> Make the message mapper and mailbox mapper, etc block for as long as they need.
> (if james is instantiating threads per smtp connection, or per transaction, I should
do this.)
>
> Make the message mapper&  mailbox mapper not block and do my own thread pooling to
write the incoming data to the external store.
> (if james blocks on transactions, so that if one takes a while, it will block the server
from functioning correctly)
>
>
> What is best?
>
> -tim
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>

-- 
eric | http://about.echarles.net | @echarles

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


Mime
View raw message