axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1717) Anti-social size determination for attachments
Date Tue, 25 Jan 2005 18:29:17 GMT
     [ http://issues.apache.org/jira/browse/AXIS-1717?page=comments#action_58059 ]
     
Davanum Srinivas commented on AXIS-1717:
----------------------------------------

Sean,

Do you have a patch based on getDataSize?

thanks,
dims

> Anti-social size determination for attachments
> ----------------------------------------------
>
>          Key: AXIS-1717
>          URL: http://issues.apache.org/jira/browse/AXIS-1717
>      Project: Axis
>         Type: Bug
>   Components: SAAJ
>     Versions: 1.2RC2
>     Reporter: Sean Barnett
>     Priority: Minor

>
> The following code is taken from AttachmentPart method getSize():
>     public int getSize() throws SOAPException {
>         if (datahandler == null) {
>             return 0;
>         }
>         ByteArrayOutputStream bout = new ByteArrayOutputStream();
>         try {
>             datahandler.writeTo(bout);
>         } catch (java.io.IOException ex) {
>             log.error(Messages.getMessage("javaIOException00"), ex);
>             throw new SOAPException(Messages.getMessage("javaIOException01", ex.getMessage()),
ex);
>         }
>         return bout.size();
>     }
> My understanding is that when the attachment is large the entire attachment will be stored
in memory (in the ByteArrayOutputStream). This is unfortunate considering the elegant ManagedMemoryDataSource
approach of keeping large attachments out of memory.
> The class DimeBodyPart implementation of getDataSize() is perhaps a template for improving
this behaviour.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message