1/31/2024 0 Comments Startup timeThat is because each class file (except ones in ignored JARs) has to be read and parsed looking for annotations in it.Īn example of a container-provided SCI that triggers annotation scanning is the WebSocket API implementation which is included with standard distribution in all versions of Tomcat 8 and with Tomcat 7 starting with 7.0.47. Scans for Tag Library Descriptor files, META-INF/**/*.tld).Īmong the scans the annotation scanning is the slowest. TLD scanning, (Discovery of tag libraries.Older features, introduced by earlier specifications: Annotations that define components for 3-rd party libraries initialized by an SCI (arbitrary annotations that are defined in annotation on a SCI class).Annotations that define components of a web application ( etc.).Resources of a web application bundled in jar files ( META-INF/resources/*).Web fragments ( META-INF/web-fragment.xml).It is also possible to configure which JARs Tomcat should skip.įor further talk, the features that require scanning are: Conformance to the specification requires that the scanning were performed by default, but you can configure your own web application in several ways to avoid it (see below). Unfortunately, these features require scanning of JAR and class files, which may take noticeable time. Those exist to simplify a structure of a web application and to simplify plugging of additional frameworks. The Servlet 3.0 specification (chapter 8) introduced support for several "plugability features". See Troubleshooting and Diagnostics page for details. That is to take several thread dumps to see what Tomcat is really doing. Generalīefore we continue to specific tips and tricks, the general advice is that if Tomcat hangs or is not responsive, you have to perform diagnostics. This section provides several recommendations on how to make your web application and Apache Tomcat as a whole to start up faster.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |