Lari Pannila created CXF-7688:
---------------------------------

             Summary: AttachmentDeserializer does not respect 
"org.apache.cxf.io.CachedOutputStream.Threshold" -property
                 Key: CXF-7688
                 URL: https://issues.apache.org/jira/browse/CXF-7688
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 3.2.3, 3.1.14
            Reporter: Lari Pannila


*Problem:*
Setting the system property "org.apache.cxf.io.CachedOutputStream.Threshold" to 
raise the threshold size of writing a temporary file to disk, does not affect 
AttachmentDeserializer.

AttachmentDeserializer will call 
AttachmentUtil.setStreamedAttachmentProperties(Message, CachedOutputStream), 
effectively setting the temp-file threshold to AttachmentDeserializer.THRESHOLD 
(100k).

*Solution:*
AttachmentDeserializer should read the system property and set its value to the 
message context with the key 
AttachmentDeserializer.ATTACHMENT_MEMORY_THRESHOLD, before calling 
AttachmentUtil.setStreamedAttachmentProperties(...).

*Workaround:*
Register a custom interceptor, which will write the above mentioned system 
property to the message context. The interceptor must be registered to a Phase 
that will be called before JAXBAttachmentSchemaValidationHack is called.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to