[
https://issues.apache.org/jira/browse/CXF-3505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031018#comment-13031018
]
ext2 commented on CXF-3505:
---------------------------
the problem is somewhat releate the javax.acivation.DataHandler's implement;
check the difference of two activation library:
Geronimo's :
public DataHandler(DataSource ds) {
this.ds = ds;
this.flavor = new ActivationDataFlavor(ds.getContentType(), null);
}
// getContentType() of CXF's LazyDataSource will en-force it to be
loaded; then: attachments(not last one) will cached, and the last attachment
still keep delegate to network stream;
Sun's:
public DataHandler(DataSource ds) {
// save a reference to the incoming DS
dataSource = ds;
oldFactory = factory; // keep track of the factory
}
//doesn't call any method of LazyDataSource, so it cannot enforce the
CXF's LazyDataSource to Load; so the attachments are not cached; Then 2 problem
will occurs: 1) cannot release http-connection 2)if user-application doesn't
consume the inputstream, just close it. A temporary file will be left on disk
and keep open;
> CXF attachment doesn't compatible with SUN's ACTIVATION library
> ----------------------------------------------------------------
>
> Key: CXF-3505
> URL: https://issues.apache.org/jira/browse/CXF-3505
> Project: CXF
> Issue Type: Bug
> Reporter: ext2
> Attachments: attachment-clean.zip
>
>
> if using sun's javax.activation api (version 1.1) instead of geronimo's
> activation api. CXF's attachments . the http connection cannot be released
> corrrectly;
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira