FYI the concurrency unit test url is
https://svn.apache.org/repos/asf/camel/trunk/components/camel-mina/src/test/java/org/apache/camel/component/mina/MinaProducerConcurrentTest.java
Willem
jamhit wrote:
Thanks Claus. 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?
Also, will you please post the link to the camel 2.0 trunk with concurrency
unit test?
Claus Ibsen-2 wrote:
On Sun, Sep 13, 2009 at 6:38 AM, jamhit <[email protected]>
wrote:
I am getting errors when trying to send more than one message to a legacy
tcp/ip service using a Apache camel mina endpoint. Everything works as
expected when requests are send one at a time. Using camel 1.6. 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
Looks like the remote server forbids multiple connections from same IP
(client).
There is a concurrency unit test in the unit tests for camel 2.x (trunk).
So locally with mina itself it can handle multiple connections.
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(SocketIoProcessor.java:218)
at
org.apache.mina.transport.socket.nio.SocketIoProcessor.process(SocketIoProcessor.java:198)
at
org.apache.mina.transport.socket.nio.SocketIoProcessor.access$400(SocketIoProcessor.java:45)
at
org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:485)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
--
View this message in context:
http://www.nabble.com/Apache-camel-mina-concurrency-issue-tp25420520p25420520.html
Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
Apache Camel Committer
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus