Re: Very Strange problem with a static varible on a jsp

2001-07-27 Thread Lachezar Dobrev
> I see what you mean. Good. > So it seems that the only solution to be sure a class is not unloaded is to make > your own class loader for that class. Unfortunately, this solution can not be > applied to a servlet. Or make a singleton to keep the class loaded. I do this, and it works. Even

Re: Very Strange problem with a static varible on a jsp

2001-07-27 Thread Catalin Grigoroscuta
I see what you mean. So it seems that the only solution to be sure a class is not unloaded is to make your own class loader for that class. Unfortunately, this solution can not be applied to a servlet. Lachezar Dobrev wrote: > > Hello, > > Your objection makes sense, but here is sometrinh from t

Re: Very Strange problem with a static varible on a jsp

2001-07-26 Thread Lachezar Dobrev
> Hello, > Your objection makes sense, but here is sometrinh from the JVM specification > from SUN: > > "2.17.8Unloading of Classes and Interfaces A class or interface may be > unloaded if and only if its class loader is unreachable. > The bootstrap class loader is always reachable; as a resul

Re: Very Strange problem with a static varible on a jsp

2001-07-26 Thread Catalin Grigoroscuta
Hello, Your objection makes sense, but here is sometrinh from the JVM specification from SUN: "2.17.8Unloading of Classes and Interfaces A class or interface may be unloaded if and only if its class loader is unreachable. The bootstrap class loader is always reachable; as a result, system cla

Re: Very Strange problem with a static varible on a jsp

2001-07-26 Thread Rich Ernst
smael > > >Regards, > > > >the elephantwalker > > > > > >-Original Message- > >From: [EMAIL PROTECTED] > >[mailto:[EMAIL PROTECTED]]On Behalf Of Ismael > >Sent: Wednesday, July 25, 2001 2:33 AM > >To: Orion-Interest > >Subj

Re: Very Strange problem with a static varible on a jsp

2001-07-26 Thread Lachezar Dobrev
Hmmm... Oh yes, it does. When there are no more instances of a specific class, the class itself is being disposed off. Creating new instance reloads the class. > You see, your scenario couldn't exactly happen: > The garbage collector cleans all class instances (in this case only one > in

Re: Very Strange problem with a static varible on a jsp

2001-07-26 Thread Catalin Grigoroscuta
You see, your scenario couldn't exactly happen: The garbage collector cleans all class instances (in this case only one instance), but not the class itself. The class loader does not unload the class bytecode, and the static fields do not reside in any of the class instances that are released by t

Re: Very Strange problem with a static varible on a jsp

2001-07-26 Thread Luis Arias
-Interest Sent: Tuesday, July 24, 2001 1:38 PM Subject: Very Strange problem with a static varible on a jsp I am making some loading tests, in order to test the loading tool I have written some special jsp to deal verify the number of times a jsp has been called. My jsp is : <%@page contentType=&q

RE: Very Strange problem with a static varible on a jsp

2001-07-26 Thread Ismael
ntext. Maybe this way it works, but I think that using a static variable should also work. Regards, Ismael >Regards, > >the elephantwalker > > >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED]]On Behalf Of Ismael >Sent: Wednesday, July 25, 2001

Re: Very Strange problem with a static varible on a jsp

2001-07-25 Thread Lachezar Dobrev
Hi. This MAY be totally wrong, but I have seen that in a different place in a different problem, in a different need. I got the same thing. Problem: Static varialbles are being reset from time to time. My Answer: The lifetime of the Servlets/EJBs/JSPs is defined by how the webcontain

RE: Very Strange problem with a static varible on a jsp

2001-07-25 Thread elephantwalker
001 2:33 AM To: Orion-Interest Subject: Re: Very Strange problem with a static varible on a jsp Sorry, But I do not understand what you mean. What I want is to have only a counter for all the requests. At 13:35 24/07/2001 -0500, you wrote: >Instead of static I would use a member attribute, sinc

Re: Very Strange problem with a static varible on a jsp

2001-07-25 Thread Ismael
Sorry, But I do not understand what you mean. What I want is to have only a counter for all the requests. At 13:35 24/07/2001 -0500, you wrote: >Instead of static I would use a member attribute, since for servlets >only one instance exists for a given class. > >Ismael wrote: > > > I am making s

Re: Very Strange problem with a static varible on a jsp

2001-07-24 Thread Jens Frank
Just a question man... how do you send messages to the mailinglist? The orionserver mailinglist I mean.

Re: Very Strange problem with a static varible on a jsp

2001-07-24 Thread Rich Ernst
Instead of static I would use a member attribute, since for servlets only one instance exists for a given class. Ismael wrote: > I am making some loading tests, in order to test the loading tool I > have written some special jsp to deal verify the number of times a jsp > has been called. > My j

Very Strange problem with a static varible on a jsp

2001-07-24 Thread Ismael
I am making some loading tests, in order to test the loading tool I have written some special jsp to deal verify the number of times a jsp has been called. My jsp is : <%@page contentType="text/html"%> JSP Page <%! static int client=0; static String attribute_name="client"; static Object lock=n