RE: ClassLoader Reloading issues: static values

2001-08-20 Thread Miles Daffin
AM To: '[EMAIL PROTECTED]' Subject: Re: ClassLoader Reloading issues On Mon, 20 Aug 2001, Andrés Aguiar wrote: I have a JAR file in my web-inf\lib directory that has an object pool. The pool is kept as a singleton, so, I have a static member with it. And because the class itself

Re: ClassLoader Reloading issues: static values

2001-08-20 Thread Endre Stølsvik
On Mon, 20 Aug 2001, Miles Daffin wrote: | This is an interesting one. | | I had assumed that statics were a nono in webapps | because they broke Context encapsulation. Easiest way to create e.g. Connection pools and the like. | I declared a public static String in a Base servlet | and built

RE: ClassLoader Reloading issues: static values

2001-08-20 Thread Craig R. McClanahan
On Mon, 20 Aug 2001, Miles Daffin wrote: This is an interesting one. I had assumed that statics were a nono in webapps because they broke Context encapsulation. It appears, however, that you can have your cake and eat it. At least in TC 3.2.1. Actually, in all containers that

ClassLoader Reloading issues

2001-08-19 Thread Andrés Aguiar
I have a JAR file in my web-inf\lib directory that has an object pool. The pool is kept as a singleton, so, I have a static member with it. The problem is that when a class in web-inf\classes is reloaded, it seems to use a new classloader, so the static member is gets not the same as it was, and

Re: ClassLoader Reloading issues

2001-08-19 Thread Dmitri Colebatch
On Mon, 20 Aug 2001, [iso-8859-1] Andrés Aguiar wrote: Now, in the servlet spec says: 'Although a Container Provider implementation of a class reloading scheme for ease of development is not required, any such implementation must ensure that all servlets, and classes that they may use, are

Re: ClassLoader Reloading issues

2001-08-19 Thread Craig R. McClanahan
On Mon, 20 Aug 2001, Andrés Aguiar wrote: I have a JAR file in my web-inf\lib directory that has an object pool. The pool is kept as a singleton, so, I have a static member with it. And because the class itself is loaded by the webapp class loader, the static is in fact global *only*

Re: ClassLoader Reloading issues

2001-08-19 Thread Vladimir Grishchenko
, August 19, 2001 8:25 PM Subject: Re: ClassLoader Reloading issues On Mon, 20 Aug 2001, Andrés Aguiar wrote: I have a JAR file in my web-inf\lib directory that has an object pool. The pool is kept as a singleton, so, I have a static member with it. And because the class itself is loaded