You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Johannes U. Jensen" <sp...@daimi.au.dk> on 2006/09/12 13:16:42 UTC
Using a threadpool
Hi,
I have been trying to use the thread pool but I am not quite sure I have
gotten it right. So far my intuition tells me this is the traversal of a
message through mina is like this (best viewed in a fixedwidth font):
Message Received -> Filterchain( filter1 -> filter2 -> ... -> filterN)
-> iohandler.
and when I insert a threadpool in the filterchain it will turn into this:
-> ...
-> FilterN -> iohandler
Message Received -> Filterchain(filter1 -> filter2 -> Threadpool -> ...
-> FilterN -> iohandler
-> ...
-> FilterN -> iohandler
where the number of braches from the threadpool is number of threads in
it. Is this correct? If so then I assume all iohandler actions are
performed on the same iohandler object, the one I pass to
ioacceptor.bind, right?
Kind regards
Johannes U. Jensen
Re: Using a threadpool
Posted by peter royal <pr...@apache.org>.
On Sep 12, 2006, at 4:16 AM, Johannes U. Jensen wrote:
> I have been trying to use the thread pool but I am not quite sure I
> have gotten it right. So far my intuition tells me this is the
> traversal of a message through mina is like this (best viewed in a
> fixedwidth font):
>
> Message Received -> Filterchain( filter1 -> filter2 -> ... ->
> filterN) -> iohandler.
yes
>
> and when I insert a threadpool in the filterchain it will turn into
> this:
> -
> > ... -> FilterN -> iohandler
> Message Received -> Filterchain(filter1 -> filter2 -> Threadpool -
> > ... -> FilterN -> iohandler
> -
> > ... -> FilterN -> iohandler
yes
> where the number of braches from the threadpool is number of
> threads in it. Is this correct? If so then I assume all iohandler
> actions are performed on the same iohandler object, the one I pass
> to ioacceptor.bind, right?
yup!
-pete
--
proyal@apache.org - http://fotap.org/~osi