Kumar Phani wrote:
Hi ,
--------------------------------------------------------------------------------------------Code--------------------------------------
acceptor = new NioSocketAcceptor(Runtime.getRuntime().availableProcessors()
+ 1);
Duplicate effort. new NioSocketAcceptor() will create the same thing.
DefaultIoFilterChainBuilder chain = acceptor.getFilterChain();
acceptor.setReuseAddress(true);
ThreadPoolExecutor threadPool = new
ThreadPoolExecutor(1000,2000,600L,
TimeUnit.SECONDS,new ArrayBlockingQueue<Runnable>(1000),new
ThreadPoolExecutor.CallerRunsPolicy());
int threadNum = threadPool.prestartAllCoreThreads();
log.debug("Number of Threads---"+threadNum);
acceptor.getFilterChain().addFirst("log", new LoggingIOFilter());
acceptor.getFilterChain().addLast(
"protocol"
, new ProtocolCodecFilter(new GRTxCodecFactory())
);
chain.addLast("threadPool", new ExecutorFilter(threadPool));
acceptor.setHandler( new GRTxServerHandler(this, listener));
-------------------------------------------------------------------------------------------Code--------------------------------------
Actually I am trying with this code after your valuable suggestion.
Correct me if I am wrong..
But it is not taking Multiple Client requests simultaneoulsy.
What exactly conduct you to think that the server does not take multiple
client requests simultanously ?
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org