User-agent: Mozilla Thunderbird 0.9 (X11/20041103)
We have a product that uses a JarURLConnection to download and use a jar
filen off of a server. I've encountered a problem, and I'm not sure if
it's a Java bug or an implementation failure on our part. Here's what
happens:
1. The network is down, and we try to download the Jar file. This fails
immediately and issues a failure message, which is what we expect to happen.
2. Now we bring the network up and attempt to download the jar file.
This succeeds immediately which is what we expect.
3. HERE'S THE PROBLEM. Now, we take the network connection down again
and attempt download the Jar file. We expect an immediate failure, but
instead of failing immediately, the program hangs for about 60 seconds
(which sounds like a timeout to me) and THEN it fails, sending the
message it cannot connect only after this timeout. Not only that but all
subsequent attempts to download the Jar file exhibit this same "timeout
like" behaviour.
My guess is that once the URLConnection is made, a protected boolean
value called "connected" is set true. It appears once set true, though,
it wants to stay set true, even if it isn't (that's my guess anyway).
Does this sound like a bug or have we overlooked something in
establishing our URLConnection to download the Jar file.
Heres the p-code for how it's done:
URL u = new URL...... create the URL
urlConnection = (JarURLConnection)u.openConnection().....make the connection
attributes.....get the attributes from the connection
className = ......extract from attributes
load the class and then exectute.
(Sorry for the p-code...under an NDA)
Thanks,
Bill Wagner
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden