You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "edge wang (JIRA)" <ji...@apache.org> on 2012/04/27 18:56:49 UTC

[jira] [Reopened] (CAMEL-5225) camel-netty can't distinguish between Sharable and Unsharable codecs

     [ https://issues.apache.org/jira/browse/CAMEL-5225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

edge wang reopened CAMEL-5225:
------------------------------

    Estimated Complexity: Advanced  (was: Unknown)

Thank you very much for your response and adding my testcase to the trunk. However, your answer makes me aware of two things:

1.My testcase is very very misleading (so sorry for that), makes people think the problem is due to sharing decoders among consumers, but that's not the case, as I explained very clearly in the posts, it is because you share them among *pipelines*, not consumers.

2.Camel-netty in version 2.10 (as well as 2.9.2) introduced a new bug, severe than the one I reported, breaks netty's pipeline model more than before. Hence even I correct the implementation of DefaultServerPipelineFactory, the testcase still breaks.

So here I attach the correct testcase, and do some reference to show the problem I reported as well as the new bug introduced.

sorry again for the previous misleading testcase :)
                
> camel-netty can't distinguish between Sharable and Unsharable codecs
> --------------------------------------------------------------------
>
>                 Key: CAMEL-5225
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5225
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-netty
>    Affects Versions: 2.9.2
>         Environment: ALL
>            Reporter: edge wang
>            Assignee: Claus Ibsen
>              Labels: netty
>             Fix For: 2.10.0
>
>         Attachments: UnsharableCodecsConflictsTest.java
>
>
> Camel-netty uses general configuration model for referenced encoders/decoders for channel pipelines, see DefaultServerPipelineFactory. That is, create encoder/decoder objects at configuration parsing time and store them in a list, then use them when a pipeline is established. However, this will make encoder/decoder objects shared among different pipelines, that may cause data conflicts, when the encoder/decoder is not Sharable(has object status/not annotated as @Sharable), e.g. a LengthFieldBasedFrameDecoder.
> Although we can avoid the problem by totally writing a new serverpipelinefactory for our apps, several problem still remains, please see detailed description and testcase for this bug at:
> http://camel.465427.n5.nabble.com/camel-netty-bug-and-the-need-of-best-practice-for-creating-referenced-parameter-object-on-looking-up-td5627926.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira