Tomcat 7 slow start in JSF 2 project

I recently switched my project from using (JSF 1.x + Tomcat6) to (JSF 2.x servletes + Tomcat7).

Since then, when I run Tomcat 7 in Eclipse Indigo, it takes 25 seconds. This is too much longer than Tomcat 6 to start with in the previous JSF 1.x setup.

The server spends more time on:

22.03.2012. 10:00:22 org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.25 

What could be the reason for such a slow start?

+4
source share
1 answer

It seems that the slow issue with starting Tomcat 7 can be solved with "metadata-complete" set to "true" in web.xml, for example:

<web-app metadata-complete="true" id="WebApp_ID" version="3.0"...

The problem is that Tomcat scans annotations at startup, and this slows down significantly.

Here, the startup time is reduced from 25 seconds to 5 seconds.

+5
source

Source: https://habr.com/ru/post/1402831/


All Articles