JDK-6804925 : JNLPCachedJarURLConnection.getContentLength() may cause unneeded network requests for cached jars
  • Type: Bug
  • Component: deploy
  • Sub-Component: deployment_toolkit
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-02-12
  • Updated: 2010-09-26
  • Resolved: 2009-05-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u14 b03Fixed 7Fixed
Related Reports
Relates :  
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
EVALUATION Follow logic implemented in the plugin's jar connection handler.
18-02-2009

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

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