Hi,
Server is taking only 2 request for 3rd request it is not not able to process ,I thought that my system is dualCore . I wrote a client which is multithreaded and can able to generate 5 requests at a time. On Tue, Jun 30, 2009 at 7:51 PM, Emmanuel Lecharny <[email protected]>wrote: > 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 > > >
