<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style id="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body fPStyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<p>Hi Guys</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;There are 2 Modules in my project. I used Netty as channel between them.I used the long connection. In the pipelinefactory of clientside module, the code as follows</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; public ChannelPipeline getPipeline()<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; throws Exception<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ChannelPipeline pipeline = Channels.pipeline();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pipeline.addLast(&quot;decoder&quot;, new MessageDecoder());<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pipeline.addLast(&quot;ThreadPoolHandler&quot;, executionHandler);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pipeline.addLast(&quot;handler&quot;, new ClientHandler());<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return pipeline;<br>
&nbsp;&nbsp;&nbsp; }</p>
<p>&nbsp;</p>
<p>the code get response as follows:</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ClientHandler handler = channel.getPipeline().get(ClientHandler.class);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return handler.getResponse(request);</p>
<p>&nbsp;</p>
<p>My problem is:</p>
<p>&nbsp;1.&nbsp;is there only one ClientHandler instance even I used ExecutionHandler?</p>
<p>&nbsp;2. When there is multi-thread send request, all the get response is blocked in the ClientHandler, How should i improve the client concurrency?</p>
<p>&nbsp;</p>
<p>Any suggestion is many thanks.</p>
<p>&nbsp;</p>
<p>Sincerely</p>
<p>Liuxianning.</p>
<p>&nbsp;</p>
</div>
</body>
</html>