cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: two issues in org.apache.cxf.jaxrs.provider.DataSourceProvider
Date Tue, 01 Jul 2014 02:45:34 GMT

I’m still failing to see any issue.  As far as the user is concerned it’s an InputStream.
 Whether that is a ServeltInputStream, FileInputStream, ByteArrayInputStream, etc… should
be irrelevant.  As long as it behaves according to the InputStream contract, it shouldn’t
matter.

That said, that InputStream would ONLY be valid within the scope of the request.  If the user
needs to save the information beyond the scope of the request, they should do whatever is
necessary to “save” the data from that stream to someplace.

Again, this is not a problem.

Dan

On Jun 30, 2014, at 10:30 PM, iris ding <irisdingbj@gmail.com> wrote:

> Johan,
> 
> Can I know the reason for your point?
> 
> Actually, the key reason for the issue 2 is not for available() usage. Let
> me give an example for this issue:
> 
> If you deploy your application to Tomcat, the incomming InputStream might be
> a tomcat class which implements ServletInputStream.
> 
> If you deploy your application to WebSphere, the incoming InputStream might
> be a websphere specific class which implements ServletInputStream.
> 
> In other case, the incomming InputStream might be some other class which
> implements InputStream directly. 
> 
> In such case if we do not do conversion and return the original incomming
> InputStream, Users will loose control of it. He might need to use specific
> API to operate the different stream.
> 
> Iris Ding 
> 
> 
> 
> --
> View this message in context: http://cxf.547215.n5.nabble.com/two-issues-in-org-apache-cxf-jaxrs-provider-DataSourceProvider-tp5745783p5745788.html
> Sent from the cxf-dev mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Mime
View raw message