geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Cai <greensi...@gmail.com>
Subject Re: JarURLConnection doesn't work "useCaches" property
Date Tue, 04 Aug 2009 03:52:47 GMT
The context class loader when running in Geronimo is not the system class
loader. So it's not strange that the behavior is different.

What OS are you running these on? What do you want to achieve exactly?
Update jar files constantly?

-Jack

On Sun, Aug 2, 2009 at 10:34 PM, Masayoshi Yamashita <ymstmsys@gmail.com>wrote:

> Hello,
>
> I using Geronimo 2.1.4 & Sun JDK 1.5.0.19.
>
> When executing the following code on Geronimo server,
>
> =====================================================================
> ClassLoader loader = Thread.currentThread().getContextClassLoader();
> URL url = loader.getResource("javax/servlet/http/");
>
> JarURLConnection conn1 = (JarURLConnection) url.openConnection();
> conn1.setUseCaches(false);
> JarFile jarFile1 = conn1.getJarFile();
>
> JarURLConnection conn2 = (JarURLConnection) url.openConnection();
> conn2.setUseCaches(false);
> JarFile jarFile2 = conn2.getJarFile();
>
> System.out.println(jarFile1);
> System.out.println(jarFile2);
> =====================================================================
>
> there is a problem that "jarFile1" and "jarFile2" are same instances.
>
> When executing on Eclipse console, the variables are difference instances.
> (In addition, when "useCaches" property is true, those are same instances.)
>
> How should there be this problem?
>
> Best regards,
>
> --------------------
> Masayoshi Yamashita
>

Mime
View raw message