On 10/22/07, Kumaran Arul <[EMAIL PROTECTED]> wrote:
> Hi
>
>
> I have my business service method invoked from my messageReceived(IoSession 
> session, Object message) of my implementation of the IoHandlerAdapter class.
>
> How can I timeout my service call using MINA? Is using 
> java.util.concurrent.ScheduledThreadPoolExecutor the only way to go?

I think so.  Be aware of OOM because SchduledThreadPoolExecutor holds
tasks until timeout comes even if they are all cancelled.  You have to
purge them manually if you are processing many messages within short
timeframe.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6

Reply via email to