[ 
https://issues.apache.org/activemq/browse/CAMEL-1942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=53874#action_53874
 ] 

Claus Ibsen commented on CAMEL-1942:
------------------------------------

Yeah I might be overkill with only one session to be stored in a specialized 
MinaMessage.

You could use {{newInstance}} or what it was to ensure a MinaMessage is 
constructed so you can preserve the IoSession while being routed.
See the file component.

Anyway storing it as a header is great as well.

Remember to document this on the mina wiki page.

And storing the local and remote address in separate headers is also a good 
idea for CBR routing using headers. I wonder if it has a nice toString if its 
stored as InetAddress object. We want to be able to use regexp or equal etc. 
for nice CBR routing. If not we could consider adding a type converter in 
camel-mina for InetAddress or maybe even better in camel-core for reuse 
elsewhere.

> Allow access to IoSession via message
> -------------------------------------
>
>                 Key: CAMEL-1942
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1942
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-mina
>    Affects Versions: 2.0.0
>            Reporter: Jеns Riеmschneidеɾ
>            Assignee: Willem Jiang
>             Fix For: 2.1.0
>
>         Attachments: mina.patch
>
>
> In 1.x it was possible to get access to the IoSession via the MinaExchange.
> In 2.0, MinaExchange is no more and therefore access to the IoSession is 
> impossible.
> Add a MinaMessage that has an accessor to the IoSession set by the 
> MinaConsumer.
> Mailing List: 
> http://www.nabble.com/IoSession-data-in-Exchange-created-by-MinaConsumer-td25150794.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to