United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6804925 JNLPCachedJarURLConnection.getContentLength() may cause unneeded network requests for cached jars
JDK-6804925 : JNLPCachedJarURLConnection.getContentLength() may cause unneeded network requests for cached jars

Details
Type:
Bug
Submit Date:
2009-02-12
Status:
Closed
Updated Date:
2010-09-26
Project Name:
JDK
Resolved Date:
2009-05-13
Component:
deploy
OS:
generic
Sub-Component:
deployment_toolkit
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
6u14 (b03)

Related Reports
Backport:
Relates:

Sub Tasks

Description
If getContentLength() is the first call after construction of JNLPCachedJarURLConnection object then it will result delegate work to parent and this means network request will be performed even for cached jar file!

Obviously this have huge impact on performance as network requests are expensive.

It appears that FX applications may do this and this make this even more important.
Using SimpleVideoPlayer demo it happens 11 (!) times.

                                    

Comments
WORK AROUND

Call connect() of getContentType() before calling getContentLength().
                                     
2009-02-12
EVALUATION

Make sure connect() was called before delegating work to parent object.
                                     
2009-02-12
EVALUATION

Follow logic implemented in the plugin's jar connection handler.
                                     
2009-02-18



Hardware and Software, Engineered to Work Together