I am getting errors when trying to send more than one message to a
legacy tcp/ip service using a Apache camel mina endpoint in camel 1.6.
Everything works as expected when requests are send one at a time I am
not sure, if the issue is due to remote host forcibly closing
connection. My simple java socket client works fine by sending multiple
concurrent transactions to the same legacy server. I have a feeling it
is something in my mina configuration or codec setting. Does mina reuse
connections for multiple messages? The legacy system is expecting
separate connections per request.
I am using an extension of CumulativeProtocolDecoder. Do I need to do
something in dispose() method to forcibly close the connection or
session?
Any clues will be appreciated.
Following is the error I am getting.
Caused by: java.io.IOException: An existing connection was forcibly
closed
by the remote host
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:25)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)
at sun.nio.ch.IOUtil.read(IOUtil.java:200)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:236)
at
org.apache.mina.transport.socket.nio.SocketIoProcessor.read(SocketIoProc
essor.java:218)
at
org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoP
rocessor.java:198)
Thanks,
Hitha
682-605-1897