You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "David J. M. Karlsen (Created) (JIRA)" <ji...@apache.org> on 2012/01/14 15:41:39 UTC

[jira] [Created] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
---------------------------------------------------------------------------

                 Key: CXF-4030
                 URL: https://issues.apache.org/jira/browse/CXF-4030
             Project: CXF
          Issue Type: Improvement
          Components: Core
         Environment: N/A
            Reporter: David J. M. Karlsen


Seems like the threshold can only be set as a system property:
http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm

I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

Posted by "David J. M. Karlsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13203363#comment-13203363 ] 

David J. M. Karlsen commented on CXF-4030:
------------------------------------------

I think it uses buffering because I see:

{noformat}
Messages: Outbound Message (saved to tmp file):
Filename: /eos/p1/pay/i1/jetty/tmp/cxf-tmp-489213/cos3610240135095598439tmp
{noformat}

in the payload logs.
                
> externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
> ---------------------------------------------------------------------------
>
>                 Key: CXF-4030
>                 URL: https://issues.apache.org/jira/browse/CXF-4030
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Alessio Soldano
>
> Seems like the threshold can only be set as a system property:
> http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm
> I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

Posted by "Alessio Soldano (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alessio Soldano updated CXF-4030:
---------------------------------

    Fix Version/s: 2.6
    
> externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
> ---------------------------------------------------------------------------
>
>                 Key: CXF-4030
>                 URL: https://issues.apache.org/jira/browse/CXF-4030
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Alessio Soldano
>             Fix For: 2.6
>
>
> Seems like the threshold can only be set as a system property:
> http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm
> I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

Posted by "Alessio Soldano (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205544#comment-13205544 ] 

Alessio Soldano commented on CXF-4030:
--------------------------------------

I've added setInMemThreshold(long t) / getInMemThreshold() to the AbstractLoggingInterceptor to be used when creating the CachedOutputStream  instances.
                
> externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
> ---------------------------------------------------------------------------
>
>                 Key: CXF-4030
>                 URL: https://issues.apache.org/jira/browse/CXF-4030
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Alessio Soldano
>             Fix For: 2.6
>
>
> Seems like the threshold can only be set as a system property:
> http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm
> I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

Posted by "Daniel Kulp (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp updated CXF-4030:
-----------------------------

    Fix Version/s: 2.5.3
    
> externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
> ---------------------------------------------------------------------------
>
>                 Key: CXF-4030
>                 URL: https://issues.apache.org/jira/browse/CXF-4030
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Alessio Soldano
>             Fix For: 2.5.3, 2.6
>
>
> Seems like the threshold can only be set as a system property:
> http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm
> I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

Posted by "Alessio Soldano (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alessio Soldano reassigned CXF-4030:
------------------------------------

    Assignee: Alessio Soldano
    
> externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
> ---------------------------------------------------------------------------
>
>                 Key: CXF-4030
>                 URL: https://issues.apache.org/jira/browse/CXF-4030
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Alessio Soldano
>
> Seems like the threshold can only be set as a system property:
> http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm
> I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

Posted by "David J. M. Karlsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205489#comment-13205489 ] 

David J. M. Karlsen commented on CXF-4030:
------------------------------------------

Correct - I use LoggingInterceptor for the responses.
                
> externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
> ---------------------------------------------------------------------------
>
>                 Key: CXF-4030
>                 URL: https://issues.apache.org/jira/browse/CXF-4030
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Alessio Soldano
>
> Seems like the threshold can only be set as a system property:
> http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm
> I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

Posted by "Alessio Soldano (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alessio Soldano resolved CXF-4030.
----------------------------------

    Resolution: Fixed
    
> externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
> ---------------------------------------------------------------------------
>
>                 Key: CXF-4030
>                 URL: https://issues.apache.org/jira/browse/CXF-4030
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Alessio Soldano
>             Fix For: 2.6
>
>
> Seems like the threshold can only be set as a system property:
> http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm
> I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

Posted by "Alessio Soldano (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201432#comment-13201432 ] 

Alessio Soldano commented on CXF-4030:
--------------------------------------

AFAICS the use of CachedOutputStream for dealing with multipart/related messages and attachments in general is already going through the CachedOutputStream(long threshold) constructor (see for instance the org.apache.cxf.attachment.AttachmentDeserializer and its ATTACHMENT_* constants for controlling threshold, maxsize, etc. through message context properties).
Is that enough? Or you need to control these settings in different scenarios?
                
> externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
> ---------------------------------------------------------------------------
>
>                 Key: CXF-4030
>                 URL: https://issues.apache.org/jira/browse/CXF-4030
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Alessio Soldano
>
> Seems like the threshold can only be set as a system property:
> http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm
> I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

Posted by "Alessio Soldano (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13202447#comment-13202447 ] 

Alessio Soldano commented on CXF-4030:
--------------------------------------

I couldn't identify a (jaxws) scenario (besides the attachment one) in which the CachedOutputStream's threshold is actually relevant; could you provide more details / a testcase? Thanks
                
> externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
> ---------------------------------------------------------------------------
>
>                 Key: CXF-4030
>                 URL: https://issues.apache.org/jira/browse/CXF-4030
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Alessio Soldano
>
> Seems like the threshold can only be set as a system property:
> http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm
> I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

Posted by "David J. M. Karlsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13201490#comment-13201490 ] 

David J. M. Karlsen commented on CXF-4030:
------------------------------------------

Yes, this is for plain messages where my responses are just largish (~300-400k)
                
> externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
> ---------------------------------------------------------------------------
>
>                 Key: CXF-4030
>                 URL: https://issues.apache.org/jira/browse/CXF-4030
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Alessio Soldano
>
> Seems like the threshold can only be set as a system property:
> http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm
> I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4030) externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold

Posted by "Alessio Soldano (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205366#comment-13205366 ] 

Alessio Soldano commented on CXF-4030:
--------------------------------------

Ah, I think now I see the situation, you're using a LoggingOutInterceptor for logging the outgoing message, right? That sets a CacheAndWriteOutputStream (which extends the CachedOutputStream) as output stream for the current Message, caches everything and print the the copy on the logs on stream close.
I think you can simply use a custom interceptor that allows for setting the threshold / max size in the used CacheAndWriteOutputStream, I'm modifying the LoggingOutIntercetor soon accordingly.
                
> externalize configuration of org.apache.cxf.io.CachedOutputStream.Threshold
> ---------------------------------------------------------------------------
>
>                 Key: CXF-4030
>                 URL: https://issues.apache.org/jira/browse/CXF-4030
>             Project: CXF
>          Issue Type: Improvement
>          Components: Core
>         Environment: N/A
>            Reporter: David J. M. Karlsen
>            Assignee: Alessio Soldano
>
> Seems like the threshold can only be set as a system property:
> http://www.java2s.com/Open-Source/Java-Document/Web-Services-apache-cxf-2.2.6/common/org/apache/cxf/io/CachedOutputStream.java.htm
> I'd like to configure the threshold individually for applications in the same container - so it would be preferable to configure this through the endpoint and/or bus.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira