Axiom
  1. Axiom
  2. AXIOM-377

When a multipart message is built, there should be a way to retrieve a DataHandler to the MTOM part without reading the entire incoming stream

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.13
    • Component/s: None
    • Labels:
      None

      Description

      This feature is particularly useful when large attachments are used. Building large attachments in memory drives the system OOM and building them on files drastically reduces performance.

      1. AXIOM-377.patch
        12 kB
        Sadeep Jayasumana

        Issue Links

          Activity

          Hide
          Sadeep Jayasumana added a comment -

          Attaching the patch. Please review and commit.

          Show
          Sadeep Jayasumana added a comment - Attaching the patch. Please review and commit.
          Hide
          Andreas Veithen added a comment -

          The proposed change would only work in a very limited set of scenarios. In particular for XOP/MTOM it is only guaranteed to work in scenarios where the message has a single element of type base64binary. In cases where there are multiple optimized elements, Axiom would not be able to make sure that the message can be serialized successfully. That is because of the following requirement in the XOP specs:

          "Except for purposes of determining the root MIME part, as specified by [RFC 2387], ordering of MIME parts MUST NOT be considered significant to XOP processing or to the construction of the XOP Infoset."

          We need to think more carefully about this to come up with a solution that covers all reasonable scenarios.

          Show
          Andreas Veithen added a comment - The proposed change would only work in a very limited set of scenarios. In particular for XOP/MTOM it is only guaranteed to work in scenarios where the message has a single element of type base64binary. In cases where there are multiple optimized elements, Axiom would not be able to make sure that the message can be serialized successfully. That is because of the following requirement in the XOP specs: "Except for purposes of determining the root MIME part, as specified by [RFC 2387] , ordering of MIME parts MUST NOT be considered significant to XOP processing or to the construction of the XOP Infoset." We need to think more carefully about this to come up with a solution that covers all reasonable scenarios.
          Hide
          Andreas Veithen added a comment -

          A couple of things that might be interesting to take into account while thinking about this issue:

          • As noted in AXIOM-350, the Part/PartFactory stuff is actually not part of the public API. Therefore we could do some refactoring in that part of the code without breaking things for application code.
          • We may reconsider AXIOM-326. The James project recently released mime4j 0.7 and it supports pull style parsing of MIME messages. One of the problems with the current MIME code in Axiom is that it is very complex. If we get rid of that code and use mime4j instead, then this will probably make it easier to implement more sophisticated optimizations.
          Show
          Andreas Veithen added a comment - A couple of things that might be interesting to take into account while thinking about this issue: As noted in AXIOM-350 , the Part/PartFactory stuff is actually not part of the public API. Therefore we could do some refactoring in that part of the code without breaking things for application code. We may reconsider AXIOM-326 . The James project recently released mime4j 0.7 and it supports pull style parsing of MIME messages. One of the problems with the current MIME code in Axiom is that it is very complex. If we get rid of that code and use mime4j instead, then this will probably make it easier to implement more sophisticated optimizations.
          Hide
          Andreas Veithen added a comment -

          AXIOM-329 expressed a similar requirement and introduced a change that enabled streaming in another very specific scenario.

          Referring to the discussion in [1], I think it is fair to say that we don't make Axiom a good framework by implementing multiple features for the same requirement, but with each one covering a tiny set of scenarios.

          [1] http://markmail.org/thread/zuagl2pzzdyramvw

          Show
          Andreas Veithen added a comment - AXIOM-329 expressed a similar requirement and introduced a change that enabled streaming in another very specific scenario. Referring to the discussion in [1] , I think it is fair to say that we don't make Axiom a good framework by implementing multiple features for the same requirement, but with each one covering a tiny set of scenarios. [1] http://markmail.org/thread/zuagl2pzzdyramvw
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #481 (See https://builds.apache.org/job/ws-axiom-trunk/481/)
          AXIOM-377 (step 1): Logically separate the header parsing code from the content buffering code.

          Rationale: In order to decide whether an attachment can be streamed or needs to be buffered, it is necessary to inspect the headers, in particular to determine the content ID.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnMemory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartFactory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnFile.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnFile.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java
          • /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/attachments/impl/ContentStoreFactory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnMemoryEnhanced.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentStore.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/AbstractPart.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #481 (See https://builds.apache.org/job/ws-axiom-trunk/481/ ) AXIOM-377 (step 1): Logically separate the header parsing code from the content buffering code. Rationale: In order to decide whether an attachment can be streamed or needs to be buffered, it is necessary to inspect the headers, in particular to determine the content ID. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnMemory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartFactory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnFile.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnFile.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java /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/attachments/impl/ContentStoreFactory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/PartOnMemoryEnhanced.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentStore.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/AbstractPart.java
          Hide
          Andreas Veithen added a comment -

          Here is the current plan:

          Attachments should return DataHandler instances that expose an interface similar to the StreamingDataHandler class used in the JAX-WS reference implementation, in particular the following method:

          InputStream readOnce();

          This would allow application code to request the attachment to be streamed. This would also be used when an MTOM message is serialized using serializeAndConsume. In all other cases (access using the standard DataHandler methods; multiple attachments that are not accessed sequentially), the attachment would be buffered so that streaming unaware application code will continue to work as usual. It also means that streaming doesn't require any additional configuration.

          In principle this is almost trivial to implement. However, there are a couple of constraints related to existing code that need to be taken into account:

          • Axiom already defines various custom DataHandler and DataSource implementations/extensions such as CachedFileDataSource and DataHandlerExt. We need to make sure that we continue to support them if we determine that they are still necessary.
          • All accesses to temporary files happen through LifecycleManager/FileAccessor. FileAccessor currently also acts as a factory for DataHandler objects for attachments buffered on disk. This is a problem because we need to create DataHandler instances that support streaming, but streaming is not a concern of FileAccessor.

          For most of the code related to these classes, unit test coverage is insufficient or non existing (in particular for the changes in AXIOM-269) [We should forbid committing any code not covered by unit tests :-(]. Therefore we first need to write a couple of unit tests that allow us to ensure non regression for the features we want to preserve.

          Note that the solution is suboptimal (but works) in the following scenarios (where Sadeep's patch would simply fail):

          • MTOM + data binding + multiple attachments: only the last attachment can be streamed because the data binding requests all DataHandler objects before invoking the service, which means that all attachments except the last one will be buffered
          • forwarding an MTOM message where the attachments are in a different order than the xop:Include elements referencing them: in this case, the order in which the serializer requests the data handlers doesn't allow streaming of all attachments
          Show
          Andreas Veithen added a comment - Here is the current plan: Attachments should return DataHandler instances that expose an interface similar to the StreamingDataHandler class used in the JAX-WS reference implementation, in particular the following method: InputStream readOnce(); This would allow application code to request the attachment to be streamed. This would also be used when an MTOM message is serialized using serializeAndConsume. In all other cases (access using the standard DataHandler methods; multiple attachments that are not accessed sequentially), the attachment would be buffered so that streaming unaware application code will continue to work as usual. It also means that streaming doesn't require any additional configuration. In principle this is almost trivial to implement. However, there are a couple of constraints related to existing code that need to be taken into account: Axiom already defines various custom DataHandler and DataSource implementations/extensions such as CachedFileDataSource and DataHandlerExt. We need to make sure that we continue to support them if we determine that they are still necessary. All accesses to temporary files happen through LifecycleManager/FileAccessor. FileAccessor currently also acts as a factory for DataHandler objects for attachments buffered on disk. This is a problem because we need to create DataHandler instances that support streaming, but streaming is not a concern of FileAccessor. For most of the code related to these classes, unit test coverage is insufficient or non existing (in particular for the changes in AXIOM-269 ) [We should forbid committing any code not covered by unit tests :-(] . Therefore we first need to write a couple of unit tests that allow us to ensure non regression for the features we want to preserve. Note that the solution is suboptimal (but works) in the following scenarios (where Sadeep's patch would simply fail): MTOM + data binding + multiple attachments: only the last attachment can be streamed because the data binding requests all DataHandler objects before invoking the service, which means that all attachments except the last one will be buffered forwarding an MTOM message where the attachments are in a different order than the xop:Include elements referencing them: in this case, the order in which the serializer requests the data handlers doesn't allow streaming of all attachments
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #490 (See https://builds.apache.org/job/ws-axiom-trunk/490/)
          AXIOM-377 (step 2): Reversed the DataHandler creation logic. In 1.2.12, the DataHandler is created by PartOnFile/PartOnMemory, i.e. after the MIME part content has been buffered. If we want to support streaming, then the DataHandler must be created before we decide whether the content is streamed or buffered and how it is buffered. Note that this implies that we now always create a DataHandler implementing DataHandlerExt. For memory buffered parts, the purgeDataSource method will simply release the allocated memory.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java
          • /webservices/commons/trunk/modules/axiom/src/docbkx/userguide.xml
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnMemory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataSource.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/PartOnFileTest.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnFile.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java
          • /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/attachments/impl/ContentStoreFactory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentStore.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #490 (See https://builds.apache.org/job/ws-axiom-trunk/490/ ) AXIOM-377 (step 2): Reversed the DataHandler creation logic. In 1.2.12, the DataHandler is created by PartOnFile/PartOnMemory, i.e. after the MIME part content has been buffered. If we want to support streaming, then the DataHandler must be created before we decide whether the content is streamed or buffered and how it is buffered. Note that this implies that we now always create a DataHandler implementing DataHandlerExt. For memory buffered parts, the purgeDataSource method will simply release the allocated memory. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java /webservices/commons/trunk/modules/axiom/src/docbkx/userguide.xml /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnMemory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataSource.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/PartOnFileTest.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnFile.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java /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/attachments/impl/ContentStoreFactory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentStore.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #491 (See https://builds.apache.org/job/ws-axiom-trunk/491/)
          AXIOM-377: Make sure that we create a CachedFileDataSource for MIME parts buffered on disk. The cleanup logic in Axis2 depends on this.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/src/docbkx/userguide.xml
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnMemory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/PartOnFileTest.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnFile.java
          • /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/attachments/impl/ContentStore.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #491 (See https://builds.apache.org/job/ws-axiom-trunk/491/ ) AXIOM-377 : Make sure that we create a CachedFileDataSource for MIME parts buffered on disk. The cleanup logic in Axis2 depends on this. veithen : Files : /webservices/commons/trunk/modules/axiom/src/docbkx/userguide.xml /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnMemory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/PartOnFileTest.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/impl/ContentOnFile.java /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/attachments/impl/ContentStore.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #505 (See https://builds.apache.org/job/ws-axiom-trunk/505/)
          AXIOM-377: Don't pass the MIME parser to ContentStoreFactory, but only the input stream.
          AXIOM-377: Make sure that buildWithAttachments still behaves as expected, i.e. completely reads all referenced MIME parts.
          AXIOM-377 (step 3): Defer reading the MIME part content until it is requested from the DataHandler (previously the part was read when requesting the DataHandler).
          Avoid the call to Part#getSize() because this requires buffering of the part, which prevents us from implementing streaming (AXIOM-377) properly.

          The code was introduced by AXIOM-383 but is actually unnecessary:

          • The buffering logic works well with with empty attachments.
          • The case where "the stream end[s] without having a MIME message terminator" is irrelevant because such a message should generate an exception.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ContentStoreFactory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestBuildWithAttachments.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/TestConstants.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #505 (See https://builds.apache.org/job/ws-axiom-trunk/505/ ) AXIOM-377 : Don't pass the MIME parser to ContentStoreFactory, but only the input stream. AXIOM-377 : Make sure that buildWithAttachments still behaves as expected, i.e. completely reads all referenced MIME parts. AXIOM-377 (step 3): Defer reading the MIME part content until it is requested from the DataHandler (previously the part was read when requesting the DataHandler). Avoid the call to Part#getSize() because this requires buffering of the part, which prevents us from implementing streaming ( AXIOM-377 ) properly. The code was introduced by AXIOM-383 but is actually unnecessary: The buffering logic works well with with empty attachments. The case where "the stream end [s] without having a MIME message terminator" is irrelevant because such a message should generate an exception. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ContentStoreFactory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestBuildWithAttachments.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/om/TestConstants.java /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #506 (See https://builds.apache.org/job/ws-axiom-trunk/506/)
          AXIOM-377 (step 4): Implemented DataHandlerExt#readOnce() to enable streaming of the MIME part content.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataSource.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/DataHandlerExt.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/java/org/apache/axiom/testutils/activation/RandomDataSource.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/DataHandlerExtImpl.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #506 (See https://builds.apache.org/job/ws-axiom-trunk/506/ ) AXIOM-377 (step 4): Implemented DataHandlerExt#readOnce() to enable streaming of the MIME part content. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataSource.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/DataHandlerExt.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/attachments/AttachmentsTest.java /webservices/commons/trunk/modules/axiom/modules/axiom-testutils/src/main/java/org/apache/axiom/testutils/activation/RandomDataSource.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/DataHandlerExtImpl.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #508 (See https://builds.apache.org/job/ws-axiom-trunk/508/)
          AXIOM-377: Added the unit test that will be used to validate the attachment streaming feature.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #508 (See https://builds.apache.org/job/ws-axiom-trunk/508/ ) AXIOM-377 : Added the unit test that will be used to validate the attachment streaming feature. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #509 (See https://builds.apache.org/job/ws-axiom-trunk/509/)
          AXIOM-377: Resolved an old TODO item that would prevent streaming of MTOM messages with multiple attachments.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OptimizationPolicyImpl.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #509 (See https://builds.apache.org/job/ws-axiom-trunk/509/ ) AXIOM-377 : Resolved an old TODO item that would prevent streaming of MTOM messages with multiple attachments. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OptimizationPolicyImpl.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #511 (See https://builds.apache.org/job/ws-axiom-trunk/511/)
          AXIOM-377: Take into account that the code path executed by serializeAndConsume is significantly different if the element is complete. We need to support MIME part streaming in both cases (complete/incomplete).

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #511 (See https://builds.apache.org/job/ws-axiom-trunk/511/ ) AXIOM-377 : Take into account that the code path executed by serializeAndConsume is significantly different if the element is complete. We need to support MIME part streaming in both cases (complete/incomplete). veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #512 (See https://builds.apache.org/job/ws-axiom-trunk/512/)
          AXIOM-377: Implemented MTOM attachment streaming with serializeAndConsume.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/MTOMXMLStreamWriter.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSerializableImpl.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #512 (See https://builds.apache.org/job/ws-axiom-trunk/512/ ) AXIOM-377 : Implemented MTOM attachment streaming with serializeAndConsume. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/MTOMXMLStreamWriter.java /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/NodeImpl.java /webservices/commons/trunk/modules/axiom/modules/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/TextNodeImpl.java /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSerializableImpl.java /webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMTextImpl.java /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #515 (See https://builds.apache.org/job/ws-axiom-trunk/515/)
          Deprecated some stuff that is no longer used after the refactorings done for AXIOM-377.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/DataHandlerExtImpl.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/FileAccessor.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #515 (See https://builds.apache.org/job/ws-axiom-trunk/515/ ) Deprecated some stuff that is no longer used after the refactorings done for AXIOM-377 . veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/DataHandlerExtImpl.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/FileAccessor.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #730 (See https://builds.apache.org/job/ws-axiom-trunk/730/)
          AXIOM-377: Some code and Javadoc cleanup.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ContentOnFile.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ContentOnMemory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ContentStore.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ContentStoreFactory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContent.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContentFactory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContentOnFile.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContentOnMemory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #730 (See https://builds.apache.org/job/ws-axiom-trunk/730/ ) AXIOM-377 : Some code and Javadoc cleanup. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ContentOnFile.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ContentOnMemory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ContentStore.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/ContentStoreFactory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Part.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContent.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContentFactory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContentOnFile.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContentOnMemory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #733 (See https://builds.apache.org/job/ws-axiom-trunk/733/)
          AXIOM-377: Make sure that DataSource instances for a MIME part return consistent content types.
          AXIOM-377: Some clarifications about the PartDataHandler code.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataSource.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #733 (See https://builds.apache.org/job/ws-axiom-trunk/733/ ) AXIOM-377 : Make sure that DataSource instances for a MIME part return consistent content types. AXIOM-377 : Some clarifications about the PartDataHandler code. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataSource.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #734 (See https://builds.apache.org/job/ws-axiom-trunk/734/)
          AXIOM-377: Make sure that PartDataHandler overrides writeTo.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #734 (See https://builds.apache.org/job/ws-axiom-trunk/734/ ) AXIOM-377 : Make sure that PartDataHandler overrides writeTo. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #736 (See https://builds.apache.org/job/ws-axiom-trunk/736/)
          AXIOM-377: More cleanup.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContent.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContentFactory.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataSource.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #736 (See https://builds.apache.org/job/ws-axiom-trunk/736/ ) AXIOM-377 : More cleanup. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContent.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContentFactory.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataHandler.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartDataSource.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartImpl.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #760 (See https://builds.apache.org/job/ws-axiom-trunk/760/)
          AXIOM-377: Renamed AttachmentsImpl to AttachmentsDelegate and clarified the role of that class.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentSet.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentsDelegate.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentsImpl.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #760 (See https://builds.apache.org/job/ws-axiom-trunk/760/ ) AXIOM-377 : Renamed AttachmentsImpl to AttachmentsDelegate and clarified the role of that class. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentSet.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentsDelegate.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/AttachmentsImpl.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/MIMEMessage.java
          Hide
          Hudson added a comment -

          Integrated in ws-axiom-trunk #764 (See https://builds.apache.org/job/ws-axiom-trunk/764/)
          AXIOM-377: Ensure that files are removed from the shutdown hook when they are deleted.

          veithen :
          Files :

          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContentOnFile.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/DataHandlerExtImpl.java
          • /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleManagerImpl.java
          Show
          Hudson added a comment - Integrated in ws-axiom-trunk #764 (See https://builds.apache.org/job/ws-axiom-trunk/764/ ) AXIOM-377 : Ensure that files are removed from the shutdown hook when they are deleted. veithen : Files : /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/PartContentOnFile.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/DataHandlerExtImpl.java /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/lifecycle/impl/LifecycleManagerImpl.java
          Hide
          Sadeep Jayasumana added a comment -

          Many thanks for fixing this Andreas. It's a very important feature for Apache Synapse project too.

          Thanks,
          Sadeep

          Show
          Sadeep Jayasumana added a comment - Many thanks for fixing this Andreas. It's a very important feature for Apache Synapse project too. Thanks, Sadeep

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development