Presentation Compiler Shutdown
our ops team raised an issue that Tomcat with our Scalate app deployed is complaining of thread leakage on shutdown. Some investigation has shown that this is the Scala Presentation Compiler thread that is started by Scalate.
I've managed to create a servlet context listener that causes the presentation compiler to shutdown by issuing the following call:
Works fine, but I'm not really happy with having to cast the Compiler trait and then dig into its internals in order to access the underlying Group instance.
Any chance of adding a shutdown method direct on the Compiler trait? Then I can just issue:
Perhaps also shutdown the compiler as part of the destroy of TemplateEngineFilter (although I'm using Scalate as part of Bowler, so this this isn't as much of an issue for me)?
I've managed to create a servlet context listener that causes the presentation compiler to shutdown by issuing the following call:
myTemplateEngine.compiler.asInstanceOf[ScalaCompiler].compiler.askShutdown()
Works fine, but I'm not really happy with having to cast the Compiler trait and then dig into its internals in order to access the underlying Group instance.
Any chance of adding a shutdown method direct on the Compiler trait? Then I can just issue:
myTemplateEngine.compiler.shutdown()
Perhaps also shutdown the compiler as part of the destroy of TemplateEngineFilter (although I'm using Scalate as part of Bowler, so this this isn't as much of an issue for me)?
Leave a comment