velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Does Velocity have a shutdown mechanism?
Date Fri, 11 Jul 2008 16:32:01 GMT
My misunderstanding; I switched logging back on to get the exact message
and I see  that it just says that it creates '20 parsers'. I could have
sworn that these were threads (perhaps in an earlier version? I've been
using Velocity since version 1.2) but this is obviously not true.

I'll have to try to isolate the cause of this problem, but at least I can
now eliminate Velocity from the list of suspects. I should have figured
this wasn't the problem, since I use VelocityViewServlet for just about
every webapp I create (no JSPs in *my* house :) and I've never seen this
issue on any of those apps.

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
> 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
> because the Velocity threads are still running. (I'm working on
> 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
> 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:

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

View raw message