EVALUATION
possible fix: One option would be to have Java Web Start have by default a custom
RMIClassLoader provider, with its getClassAnnotation
method treats the JNLPClassLoader like the system class loader, returning the value of the "java.rmi.server.codebase" system property, and
delegates to the default provider for everything else.
|
|
|
EVALUATION
the difference is indeed related to JNLPClassLoader now
extending URLClassLoader.
RMI's marshalling format annotates serialized class descriptors with a
"codebase URL path" in case the class needs to be dynamically loaded
by the receiving party. (This is done in support of RMI's dynamic
class loading functionality, which may or may not even be used by the
customer's application.) The value used for this annotation is
controlled by the RMIClassLoader provider's getClassAnotation method:
http://java.sun.com/javase/6/docs/api/java/rmi/server/RMIClassLoader.html#getClassAnnotation(java.lang.Class)
which the default provider implements as described here:
http://java.sun.com/javase/6/docs/api/java/rmi/server/RMIClassLoader.html#getDefaultProviderInstance()
Basically, if the class's defining loader is the system class loader
or one of its ancestors, or if it is not a URLClassLoader, then the
value of the "java.rmi.server.codebase" system property is used;
otherwise, a string form of the result of invoking
URLClassLoader.getURLs on the loader is used.
In this case, I gather that the JNLPClassLoader is not configured to
be considered the system class loader, but it is a URLClassLoader
whose getURLs method returns the URLs of the application's class path,
which in this case is quite lengthy.
|
|
|
EVALUATION
using wireshark, i can reproduce the problem now.
we see that extra packets are sent when the application makes RMI calls, and the problem is only seen with java web start 6.
the extra packets contains http url to the application resources (classpath to JARs)
it might be due to the change in classloader implementation in java web start 6. in 6, we extends URLClassLoader; in 5, we extends SecureClassLoader.
asking our RMI team for more information/suggestion.
|
|
|
EVALUATION
I ran the tests with both java web start 5u15, 6.0 and 6u10, and I don't see any difference.
I even use a network packet sniffer and capture the network traffic. After I press the "start test" button in the application, I only see a single network packet being sent:
-IPADDR=192.18.43.225 16:17:42.390625 22 TCP 2144 200 218.185.69.76:11114
It's the same for all 5u15, 6.0 and 6u10.
Asking customer for more information.
|
|
|
|