apache camel Mina2: failed to get the session

3k views Asked by At

below are my route code-

 <route id="route2">
        <from uri="vm:processQ"/>
        <setBody>
            <simple>${header.dateRequest}</simple>
        </setBody>
        <bean ref="smartService" method="getJatoXmlList" id="DB_getData"/>
        <split parallelProcessing="false" id="JatoList_Splitter">
            <simple>body</simple>
            <setHeader headerName="isPartEnd">
                <simple>${property.CamelSplitComplete}</simple>
            </setHeader>
            <to uri="mina2:tcp://localhost:5555?textline=true&amp;sync=false&amp;timeout=300000"/>
        </split>
    </route>

When i run it i am getting following exception

org.apache.mina.core.RuntimeIoException: Failed to get the session

am i missing anything here. Since this is a session issue, but i couldn't find any session configuration for mina.

1

There are 1 answers

0
hveiga On

Based on the Mina documentation:

The Session is at the heart of MINA : every time a client connects to the server, a new session is created, and will be kept in memory until the client is disconnected.

A session is used to store persistent informations about the connection, plus any kind of information the server might need to use during the request processing, and eventually during the whole session life.

So it seems what is happening to you is that the mina producer is trying to connect with a server but it not able to. Therefore, it is failing to get the session. So after the timeout has expired (30 seconds) it throws the RuntimeIoException. Could you check if this is going on?

For more information about the Mina Session: Reference