users@grizzly.java.net

Re: What's the best way to design custom threadpool

From: Oleksiy Stashok <oleksiy.stashok_at_oracle.com>
Date: Tue, 28 Jun 2011 11:51:24 +0200

Hello,

> hi,
> I want to desgin custom threadpool with business key,but no enough
> business data in IOStategy,
> so I don't use default workthreadpool.
>
> call flow of Server side :
> READ/ACCEPT
> kernelThreadPool--->SameThreadIOStrategy--->CustomFilter--->CustomThreadpool(control
> thread num with business key)
>
> It's OK?
Absolutely.
Here you can find a sample, which might be useful [1]. It's async echo
filter, which performs "echo" in the custom thread pool.
Make sure you correctly suspend and resume FilterChainContext.

WBR,
Alexey.


[1]
http://java.net/projects/grizzly/sources/git/content/samples/framework-samples/src/main/java/org/glassfish/grizzly/samples/echo/EchoFilterAsync.java
> -----
> Best Regards,
> Young
> --
> View this message in context: http://grizzly.1045725.n5.nabble.com/What-s-the-best-way-to-design-custom-threadpool-tp4531236p4531236.html
> Sent from the Grizzly - Users mailing list archive at Nabble.com.