Axiom
  1. Axiom
  2. AXIOM-403

Avoid buffering the root part of an XOP/MTOM message unless necessary

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.12
    • Fix Version/s: 1.2.13
    • Component/s: API
    • Labels:
      None

      Description

      Currently, the root part of an XOP/MTOM message is always buffered in memory. However, in many cases, the entire root part is processed before any of the attachment parts are accessed. Therefore the root part should only be buffered if necessary, i.e. when an attachment part is accessed before the entire root part has been consumed. One way to achieve this is to use a DetachableInputStream. Note that DetachableInputStream always buffers the content in memory (and never on disk), but this is already the case for the root part (see the code in PartContentFactory).

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        7d 22h 9m 1 Andreas Veithen 11/Dec/11 12:20
        Andreas Veithen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Andreas Veithen made changes -
        Assignee Andreas Veithen [ veithen ]
        Affects Version/s 1.2.12 [ 12316132 ]
        Hide
        Hudson added a comment -

        Integrated in ws-axiom-trunk #749 (See https://builds.apache.org/job/ws-axiom-trunk/749/)
        AXIOM-403: Make sure that the content of the root part of an XOP/MTOM message is only buffered (read into memory) if necessary.

        veithen :
        Files :

        • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java
        • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
        • /webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
        • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
        • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestRootPartStreaming.java
        Show
        Hudson added a comment - Integrated in ws-axiom-trunk #749 (See https://builds.apache.org/job/ws-axiom-trunk/749/ ) AXIOM-403 : Make sure that the content of the root part of an XOP/MTOM message is only buffered (read into memory) if necessary. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java /webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestRootPartStreaming.java
        Andreas Veithen made changes -
        Field Original Value New Value
        Fix Version/s 1.2.13 [ 12316677 ]
        Description Currently, the root part of an XOP/MTOM message is always buffered in memory. However, in many cases, the entire root part is processed before any of the attachment parts are accessed. Therefore the root part should only be buffered if necessary, i.e. when an attachment part is accessed before the entire root part has been consumed. One way to achieve this is to use a DetachableInputStream. Note that DetachableInputStream always buffers the content in memory (and never on disk), but this already the case for the root part (see the code in PartContentFactory). Currently, the root part of an XOP/MTOM message is always buffered in memory. However, in many cases, the entire root part is processed before any of the attachment parts are accessed. Therefore the root part should only be buffered if necessary, i.e. when an attachment part is accessed before the entire root part has been consumed. One way to achieve this is to use a DetachableInputStream. Note that DetachableInputStream always buffers the content in memory (and never on disk), but this is already the case for the root part (see the code in PartContentFactory).
        Hide
        Hudson added a comment -

        Integrated in ws-axiom-trunk #741 (See https://builds.apache.org/job/ws-axiom-trunk/741/)
        Some initial code for AXIOM-403.

        veithen :
        Files :

        • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java
        • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java
        • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestReadAttachmentBeforeRootPartComplete.java
        • /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/java/org/apache/axiom/testutils/RandomUtils.java
        Show
        Hudson added a comment - Integrated in ws-axiom-trunk #741 (See https://builds.apache.org/job/ws-axiom-trunk/741/ ) Some initial code for AXIOM-403 . veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/OMXMLBuilderFactory.java /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/OMTestSuiteBuilder.java /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/builder/TestReadAttachmentBeforeRootPartComplete.java /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/java/org/apache/axiom/testutils/RandomUtils.java
        Andreas Veithen created issue -

          People

          • Assignee:
            Andreas Veithen
            Reporter:
            Andreas Veithen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development