Tomcat Failstop LifecycleListener

Tomcat LifecycleListener to shut down/exit Tomcat on a failed deployment. Cf. README and JavaDoc for further information.

Лицензия

Лицензия

Категории

Категории

Tomcat Контейнер Application Servers Сеть
Группа

Группа

net.aschemann.tomcat
Идентификатор

Идентификатор

tomcat-lifecyclelistener
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

Tomcat Failstop LifecycleListener
Tomcat LifecycleListener to shut down/exit Tomcat on a failed deployment. Cf. README and JavaDoc for further information.
Ссылка на сайт

Ссылка на сайт

https://github.com/ascheman/tomcat-lifecyclelistener.git
Система контроля версий

Система контроля версий

https://github.com/ascheman/tomcat-lifecyclelistener/tree/master

Скачать tomcat-lifecyclelistener

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.aschemann.tomcat/tomcat-lifecyclelistener/ -->
<dependency>
    <groupId>net.aschemann.tomcat</groupId>
    <artifactId>tomcat-lifecyclelistener</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/net.aschemann.tomcat/tomcat-lifecyclelistener/
implementation 'net.aschemann.tomcat:tomcat-lifecyclelistener:1.0.1'
// https://jarcasting.com/artifacts/net.aschemann.tomcat/tomcat-lifecyclelistener/
implementation ("net.aschemann.tomcat:tomcat-lifecyclelistener:1.0.1")
'net.aschemann.tomcat:tomcat-lifecyclelistener:jar:1.0.1'
<dependency org="net.aschemann.tomcat" name="tomcat-lifecyclelistener" rev="1.0.1">
  <artifact name="tomcat-lifecyclelistener" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.aschemann.tomcat', module='tomcat-lifecyclelistener', version='1.0.1')
)
libraryDependencies += "net.aschemann.tomcat" % "tomcat-lifecyclelistener" % "1.0.1"
[net.aschemann.tomcat/tomcat-lifecyclelistener "1.0.1"]

Зависимости

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.tomcat : tomcat-catalina jar 7.0.90

Модули Проекта

Данный проект не имеет модулей.

Tomcat Failstop Lifecycle Listener

Build Status

This component contains a Java class implementing the Tomcat Lifecycle Listener to shut down or exit Tomcat on a failed deployment.

Add it to Tomcat:

  • Download tomcat-lifecyclelistener.jar and put it into the ${catalina.base}/lib directory
  • Extend the configuration within the context.xml as
    <!-- Stop on failed deployments:
         - Set "force" to just perform a "System.exit" of the server JVM
         - Otherwise enable call to shutdown port, optionally
           - set port (default: 8005) and shutdown password (default: SHUTDOWN) as in server.xml
           - set waitForStart (default 30s) to make the shut down command wait until TC is completely up and running
    -->
    <Listener className="net.aschemann.tomcat.lifecycle.FailstopLifecycleListener" />

The listener will send a SHUTDOWN password to Tomcat's 8005 port and Tomcat will try to make a gracefully shutdown. The port and password are configured in ${catalina.base}/conf/server.xml file like this:

    <Server port="8005" shutdown="SHUTDOWN">

For security reasons port and the shutdown password may be changed so you can override it as well as other defaults:

    <Listener className="net.aschemann.tomcat.lifecycle.FailstopLifecycleListener" port="29821" 
        shutdown="Hasta la vista, baby!" waitForStart="20" />

Or if you need to exit without gracefully shutdown you can use the force attribute:

    <Listener className="net.aschemann.tomcat.lifecycle.FailstopLifecycleListener" force="true" />

Optionally you can also add the library to your app's pom.xml:

<dependency>
    <groupId>net.aschemann.tomcat</groupId>
    <artifactId>tomcat-lifecyclelistener</artifactId>
    <version>1.0.1</version>
    <scope>provided</scope>
</dependency>

Thus you'll be able to debug the FailstopLifecycleListener class.

Версии библиотеки

Версия
1.0.1