> a how long mySingleTon will be "active" before
> it is "removed" by ExtClassLoader? for example,
> after the first time I acess myServlet with a Browser,
> then the second time will be after one day -- the "business"
> of my WEB site is very_not_Great, so I have to visit it
> BY MYSELF:-) :-) , now I guess
> ExtClassLoader will "remove" mySingleTon during this one
> day :-)
The fact is that the classes are not GCed untill there are no referances to
the Classes and to the classloader which loaded these Classes. This is
because each classloader keeps a referance to the class it loaded with
itself and unless the ClassLoader is eligible for GC, the Classes it loaded
are not eligible for GC.
Servlet container keep a referance to the instance of the classloader which
loaded the classes and so you should have that class unless something like a
reload happened.
> b With what codition ExtClassLoader will decide to remove
> mySingleTon? by time or other ? :-) What is the relation
> of ClassLoaderX and ExtClassLoader? does ClassLoaderX
> send some infomation to ExtClassLoader about mySingleTon?
see above.
> c I suppose someone put a "static counter" in mySingleTon,
> now I guess after every time that mySingleTon is loaded_
> and_remove, this "static counter" will be reset :-) or if
> someone put a "DB connection pool" in mySingleTon,
> then such connection will be opened again.
That is correct. As for the DB connection a new one will be opened, but the
old one will not be closed.
> d so I want to know how to control the "active interval"
> of mySingleTon even if there is not new "client accessing"
> to myServlet.
it is answered above.
>
> Bo
> Oct.24, 2000
regds,
Gokul
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html