added cached thread pool to mustache template engine

This commit is contained in:
Sebastian Sdorra
2012-08-12 21:46:45 +02:00
parent 093fff9f46
commit 5963cbd536

View File

@@ -45,6 +45,8 @@ import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.concurrent.Executors;
import javax.servlet.ServletContext;
/**
@@ -77,6 +79,7 @@ public class MustacheTemplateEngine implements TemplateEngine
public MustacheTemplateEngine(ServletContext context)
{
factory = new ServletMustacheFactory(context);
factory.setExecutorService(Executors.newCachedThreadPool());
}
//~--- get methods ----------------------------------------------------------
@@ -134,5 +137,5 @@ public class MustacheTemplateEngine implements TemplateEngine
//~--- fields ---------------------------------------------------------------
/** Field description */
private MustacheFactory factory;
private ServletMustacheFactory factory;
}