Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Tomcat Integration

Thomas Diesler edited this page Oct 11, 2013 · 16 revisions

Preparing Tomcat

Gravia provides a patch for for Tomcat as a Maven artefact

<dependency>
	<groupId>org.jboss.gravia</groupId>
	<artifactId>gravia-container-tomcat</artifactId>
	<classifier>patch</classifier>
	<type>zip</type>
</dependency>

It contains a number of jars that get copied to the common lib folder.

Preparing a WebApp

Gravia works with already resolved Modules that have a valid ClassLoader. In this case with the WebApp ClassLoader created by Tomcat.

Installing/Starting a Module

Before the WebApp becomes operational the target container (i.e. Tomcat) has to do the following

  1. Create the global Runtime instance
  2. Install the WebApp as a Module in the Runtime
  3. Start the WebApp Module

Stopping Stopping/Uninstalling a Module

When a WebApp gets undeployed the target container has to do the following

  1. Stop the WebApp Module
  2. Uninstall the WebApp Module from the Runtime

The Tomcat integration provides provides a ServletContextListener that does all of the above - add this to your WebApp.

Defining the Module

Have a look at Module Definition

Activating the Module

Have a look at Activating a Module

Clone this wiki locally