Hi Oleg,
> Hi Ruwan > > You have got to be very careful here. HTTP connection objects are not > thread safe! One can easily run into a race condition when interacting > with connection objects from any other but an I/O dispatch thread. > I have already encountered the above issue, and had a look at the NhttpConnection class JavaDoc and realized this. > > So, Here is the recommended way of going about this problem. You should > signal the intention to terminate the connection by setting a special > attribute in the session context or changing the state of the shared > connection state object and let the connection shut down itself, when it > is done processing the actual message. Thanks a lot for this valuable input, I was thinking how I can proceed with my limited knowledge on httpcore. Really appreciate this help. > If the persistent connection is > idle, you may need to active it by using the IOControl interface. > May be I didn't get this part, could you please tell me how to check whether the connection is idle or not? > > > http://hc.apache.org/httpcomponents-core-4.0.1/tutorial/html/nio.html#d0e1301 > Thanks, Ruwan > > Hope this helps > > Oleg > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Ruwan Linton Technical Lead & Product Manager; WSO2 ESB; http://wso2.org/esb WSO2 Inc.; http://wso2.org email: [email protected]; cell: +94 77 341 3097 blog: http://ruwansblog.blogspot.com
