United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6518816 Reduce the memory foot print for HttpURLConnection
JDK-6518816 : Reduce the memory foot print for HttpURLConnection

Details
Type:
Bug
Submit Date:
2007-01-29
Status:
Resolved
Updated Date:
2010-04-03
Project Name:
JDK
Resolved Date:
2007-06-12
Component:
core-libs
OS:
generic
Sub-Component:
java.net
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
5.0u14 (b01)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
Some of the JAX-WS applications send a lot of data in web service requests. JAX-WS uses HttpURLConnection to send the web service request. All this data is buffered in sun.net.www.http.PosterOuputStream and it remains until URLConnection is GCed. JAX-WS keeps a referece to URLConnection (even after it reads the response) to compute cerain things(for e.g: HTTP headers) lazily using URLConnection. There is no use to keep this PosterOuputStream once the request is sent. We would want the reference to PosterOuputStream to be set null at an appropriate place and thus it will reduce the memory footprint.

                                    

Comments
SUGGESTED FIX

Can set the output streams to null safely just before HttpURLConnection.java:1248
where the input stream is returned to the application.
                                     
2007-02-28
EVALUATION

Seems like a reasonable request. Will fix in 7 first, and then back-port.
                                     
2007-02-28



Hardware and Software, Engineered to Work Together