On Thu, 28 Jun 2001, Paul Hunnisett wrote:
> How does Tomcat manage standard Java beans? I have attempted to use an
> application scoped bean ands have included serialization code in the
> finalize() method and the code to read up from file in the constructor. I
An application scoped bean will "live" as long as the application
lives. It will be referenced by a Hashtable in Context ( as
implementation), to make sure it is _not_ garbage collected.
Objects are GC when there JVM detects there is no reference to it. Since
servlets are using the session/application contexts to store information,
they don't usually keep references themself.
Costin