If your tool is request-scoped, then you will need to extend the VelocityViewServlet and override the requestCleanup(request, response, context) method. You can retrieve the tool from the context using its key and perform your cleanup there.
If the tool is session-scoped, then you'll pretty much need to do the same thing, but watch for when the session becomes invalidated. I can't remember offhand the best way to do this. I spent some time looking into ways to make tools poolable in order to build this ability into the tool itself rather than the servlet, but it would require changes too big for the 1.x series. That's something we can look at once we begin 2.x (which should be early next year). On 12/20/06, Matt L. <[EMAIL PROTECTED]> wrote:
I have resource that needs to be explicitly cleaned up at when the tool goes out of scope. Is there a clean way to do this. I've figured out some work arounds, but they are so ugly. TIA, Matt -- View this message in context: http://www.nabble.com/Velocity-Tool-Cleanup-tf2861863.html#a7996679 Sent from the Velocity - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]