Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5225

camel-netty can't distinguish between Sharable and Unsharable codecs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.9.2
    • 2.9.3, 2.10.0
    • camel-netty
    • ALL

    • Advanced

    Description

      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

      Attachments

        1. UnsharableCodecsConflictsTest.java
          5 kB
          edge wang
        2. UnsharableCodecsConflictsTest.java
          4 kB
          edge wang
        3. DefaultServerPipelineFactory.java.patch
          2 kB
          edge wang

        Activity

          People

            davsclaus Claus Ibsen
            edge edge wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: