Package io.github.rajendarreddyj.tomcat.lifecycle
package io.github.rajendarreddyj.tomcat.lifecycle
Tomcat process lifecycle management for the Tomcat Maven Plugin.
This package contains classes responsible for managing the Tomcat process lifecycle, including starting, stopping, and monitoring the server process.
Lifecycle Operations
- Start - Launch Tomcat as a foreground or background process
- Stop - Gracefully shutdown Tomcat with configurable timeout
- Monitor - Wait for server readiness and handle shutdown signals
Classes
TomcatLauncher- Manages Tomcat process lifecycle, environment configuration, and startup/shutdown
Process Management
The launcher uses the catalina.sh (Unix) or catalina.bat (Windows) scripts to start and stop Tomcat. Environment variables like CATALINA_HOME, CATALINA_BASE, JAVA_HOME, and CATALINA_OPTS are configured before process launch.
Shutdown Handling
When running in foreground mode, a JVM shutdown hook is registered to ensure graceful Tomcat termination when the user presses Ctrl+C or the process is terminated.
- Since:
- 1.0.0
- Author:
- rajendarreddyj
- See Also:
-
Classes