Menu

#20 Should not do applet-style classloading for non-applets

open
nobody
None
5
2012-07-21
2012-07-21
No

When launching normal JNLP applications (not applets), NetX tries to load classes or resources that it does not find in the Jar files over HTTP from the JNLP file's codebase attribute. Since such loading blocks the requesting thread, potentially a long time, that behavior can be quite problematic for programs exhibiting certain access patterns, such as:

* Attempting to load resources from a Jar file that may or may not actually be there (normally failure is instantaneous); or
* Using nested classloaders, in which case classloader delegation will ensure that *each* class requested will go through the JNLP classloader once and fail there.

The problem is compounded when using JNLP extensions, in which case each extension's codebase will be attempted for every requested resource or class.

I'm still trying to find my way around NetX's source code so I'm not too sure if this is intended or unintentional behavior; but from what I can see so far, the intention appears to be that it only happen for applets and not stand-alone applications, so I think it's safe to classify as a bug. Either way, other JNLP clients don't do the same thing, so I can't imagine it would hurt any properly built programs if the behavior were removed.

Discussion


Log in to post a comment.