velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <>
Subject Re: Does Velocity have a shutdown mechanism?
Date Thu, 10 Jul 2008 21:07:52 GMT
No, there's no "shutdown" method.  But then, there really isn't much
to shutdown.  Velocity doesn't spawn its own threads.  There's not
really such a thing as an "engine thread" to my knowledge.  You could
have an application that init'ed 20 engines, but i don't know why
you'd want to do that.  You could have a servlet that is processing 20
requests using one or more VelocityEngines (i'd recommend one for most
cases), but again, those would be request threads and not in
Velocity's control.  What is it you see in your log file that reports
these "engine threads"?  I'm no Tomcat expert, but perhaps i can clear
up some confusion...

On Thu, Jul 10, 2008 at 9:09 AM,  <> wrote:
> I'm seeing a strange problem in Tomcat 6 when I undeploy an application
> containing a servlet that starts a VelocityEngine. In the servlet's init()
> code I create, configure and init() the VelocityEngine; the log file
> reports that 20 engine threads have been created.
> When I undeploy, the app doesn't disappear cleanly (after the undeploy,
> clicking the List Applications button on the Tomcat Manager screen shows
> that the app is still there, and the app is still in the webapps/
> directory). I'm not sure but I think that the app isn't completely closing
> because the Velocity threads are still running. (I'm working on comfirming
> that this is the cause but at this time I can't be certain.)
> Does the engine have a shutdown method that I can call from the servlet's
> destroy() method? I don't see anything in the API documentation. Is there a
> recommended way of telling a VelocityEngine to stop?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message