tomcat-deployment-listener

According to Docker best practices a Docker container should not be up if the process fails to load properly. Apache Tomcat deploys all the web applications loaded in its webapp folder. This is a resilient solution for web applications not influencing the application server. However, In a Docker environment according to best practice, the process should fail in case the web application failed to initialize properly. By adding the additional jar created by this project to Tomcat classpath and adding the new listener in the Tomcat conf/server.xml the user can make sure the Tomcat process fails in case there is an initialization exception in their web application which will cause the Tomcat used the tomcat container to abort in immediately indicate that there was an initialization error Abort tomcat when a webapp fails to deploy in Docker container Docker container best practice. Tomcat does not stop if a webapp fail to deploy and the container will continue to run. By adding this listener the tomcat will abort in case the Tomcat fails to deploy the webapp, And the container will not start. You will need to place the listener in Tomcat server.xml and set the Tomcat classpath to contain this jar

Лицензия

Лицензия

Категории

Категории

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

Группа

com.github.yohayg
Идентификатор

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

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

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

2.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

tomcat-deployment-listener
According to Docker best practices a Docker container should not be up if the process fails to load properly. Apache Tomcat deploys all the web applications loaded in its webapp folder. This is a resilient solution for web applications not influencing the application server. However, In a Docker environment according to best practice, the process should fail in case the web application failed to initialize properly. By adding the additional jar created by this project to Tomcat classpath and adding the new listener in the Tomcat conf/server.xml the user can make sure the Tomcat process fails in case there is an initialization exception in their web application which will cause the Tomcat used the tomcat container to abort in immediately indicate that there was an initialization error Abort tomcat when a webapp fails to deploy in Docker container Docker container best practice. Tomcat does not stop if a webapp fail to deploy and the container will continue to run. By adding this listener the tomcat will abort in case the Tomcat fails to deploy the webapp, And the container will not start. You will need to place the listener in Tomcat server.xml and set the Tomcat classpath to contain this jar
Ссылка на сайт

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

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

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

https://github.com/yohayg/tomcat-deployment-listener

Скачать tomcat-deployment-listener

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

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

Зависимости

compile (1)

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

test (1)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.4

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

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

Tomcat listener will abort Tomcat process when a webapp fail to deploy

Maven Central Build Status Coverage Status License: MIT Maintainability Docker Automated build Javadocs

Description

According to Docker best practices a Docker container should not be up if the process fails to load properly.

Apache Tomcat deploys all the web applications loaded in its webapp folder. This is a resilient solution for web applications not influencing the application server.

However, In a Docker environment according to best practice, the process should fail in case the web application failed to initialize properly.

By adding the additional jar created by this project to Tomcat classpath and adding the new listener in the Tomcat conf/server.xml the user can make sure the Tomcat process fails in case there is an initialization exception in their web application which will cause the Tomcat used in the tomcat container to abort, and immediately indicate that there was an initialization error.

Usage

Mount the jar in the tomcat classpath and add to server.xml:

<Listener className="org.apache.tomcat.deployment.listener.StrictStateCheckListener" />

Example

See Dockerfile:

build:

docker build -t yohayg/tomcat-deployment-listener:3.0.0 .

run:

docker run -it --rm -p 8080:8080  yohayg/tomcat-deployment-listener:3.0.0

Versions:

1.x.x - Supports tomcat7

2.x.x - Supports both tomcat8 and both tomcat9

License

This project is licensed under MIT license.

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

Версия
2.0.0
1.0.0