Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4142

"attachment-directory" property specified on RS endpoint does not change temp directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.2
    • 2.5.3, 2.6
    • JAX-RS
    • Moderate

    Description

      We need to store temporary files in specific directory for specific endpoint.
      That is needed because our service target directory is network share and for huge uploads it takes a while to move files from temporary directory to our target directory.
      We tried to use "attachment-directory" property as described here under reading large attachments: http://cxf.apache.org/docs/jax-rs-multiparts.html
      But that does not work. Setting system property "org.apache.cxf.io.CachedOutputStream.OutputDirectory" works fine, but we need it to be set up on a per-endpoint basis as it described to "attachment-directory" property configuration.
      According to sources from 2.5.2 the problem is within AttachmentDeserializer class, in cacheStreamedAttachments method as it never call setStreamedAttachmentProperties() in case if DataSource for attachment is AttachmentDataSource type.

      Attachments

        1. patch.txt
          8 kB
          Sergey Beryozkin

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            sergkorney Sergiy Korniychuk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified