The bean is a list of gifts (wedding list). The gifts are supposed to be
displayed on a JSP and as they are selected they are removed from the bean
and therefore the jsp. This works for a while, but then suddenly all the
gifts are returned to the bean - even though the removed gifts are not
stored anywhere.
they are added using a standard useBean tag: <jsp:useBean id="items"
class="wedding.ListBean" scope="application" />
Paul
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Geir Magnusson Jr.
Sent: 28 June 2001 13:37
To: [EMAIL PROTECTED]
Subject: Re: Tomcat and Beans
When you say 'reset', what do you mean?
How are these beans being instantiated and added to the application?
Paul Hunnisett wrote:
>
> The application is not being shut down! Yet somehow my beans are getting
> "reset".
>
> Paul
>
> -----Original Message-----
> From: Robert Slifka [mailto:[EMAIL PROTECTED]]
> Sent: 28 June 2001 13:26
> To: '[EMAIL PROTECTED]'
> Subject: RE: Tomcat and Beans
>
> >From "The Java Programming Language, 3rd. Ed"
>
> "When an application exits, no further GC is performed, so any objects
that
> have not yet been collected will not have their finalize() methods
invoked."
>
> - r
>
> > -----Original Message-----
> > From: Paul Hunnisett [mailto:[EMAIL PROTECTED]]
> > Sent: June 28, 2001 8:19 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: Tomcat and Beans
> >
> >
> > I'm not trying to - I only put the serialization code in as a
> > protection
> > from my bean being "reset". Originally I put in no
> > serialization code as I
> > was assured that the server would not be reset and that my
> > application bean
> > should exist for the duration of the application. It was, however,
> > regularly reset so I put in the serialization. This made no
> > difference. It
> > still gets reset.
> >
> > Paul
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Geir Magnusson Jr.
> > Sent: 28 June 2001 13:10
> > To: [EMAIL PROTECTED]
> > Subject: Re: Tomcat and Beans
> >
> >
> > 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
> > > assumed that whenever Tomcat thought a bean was unnecesary
> > it would simply
> > > garbage collect it(which would call my finalize() method)
> > but this doesn't
> > > seem to happen. The bean get's created fine, but not
> > serialized properly.
> > > What is Tomcat doing?
> >
> > How do you ensure that the bean is no longer referenced?
> >
> > --
> > Geir Magnusson Jr. [EMAIL PROTECTED]
> > System and Software Consulting
> > Developing for the web? See http://jakarta.apache.org/velocity/
> > You have a genius for suggesting things I've come a cropper with!
> >
> >
--
Geir Magnusson Jr. [EMAIL PROTECTED]
System and Software Consulting
Developing for the web? See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!