Hi Jeff,
Let me try to explain. In my controller (which is _not_
ControllerSingleton), I have a perform() method which opens a database
connection. This controller might be used by a number of templates and
have methods which might be used by some and not others, methods like
getPerformers(), getServices(), etc. Each of these methods uses the open
database connection. I'm using JDO and like other systems, it wants me to
close my database connection.
So, as I understand it, the flow is something like this:
1. Mav calls perform()...and within it, I open the database
connection
2. Mav processes my velocity templates, which call methods in my
controller, using $model.performers
3. Mav deletes the controller object
What I would like is notification between steps 2 and 3 of the pending
deletion so I can close the database connection. Does this make more sense?
Thanks,
Dan
At 07:13 AM 3/13/02 -0800, Jeff Schnitzer wrote:
>I'm not quite sure what you mean. Why not just at the end of your
>perform() method? Or are you using a ControllerSingleton, and you want
>to be notified when a new configuration is loaded and the old is being
>discarded?
>
>Jeff Schnitzer
>[EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: Dan Finkelstein [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, March 14, 2002 9:35 PM
> > To: [EMAIL PROTECTED]
> > Subject: [Mav-user] 2.0rc works fine and a "preDiscard" question
> >
> > Just a little feedback... I'm now on 2.0rc and am not having any
> > problems.... Great work!!
> >
> > One question though: In my controller objects, I would like to be
> > notified
> > when an instance is about to be deleted. I'd like to use this
>opportunity
> > to "clean-up", in this case closing a database connection.
> >
> > Can you suggest a way to do this? I would like something more reliable
> > than
> > Java's finalize() method. Or can an overidable method be easily added
>at
> > this point in the release cycle?
> >
> > Thanks,
> > Dan
> >
> >
> > _______________________________________________
> > Mav-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/mav-user
>
>_______________________________________________
>Mav-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/mav-user
_______________________________________________
Mav-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mav-user