Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Definition

Deployables are archives (WAR, EAR, etc) that can be deployed in the container

Explanation

A Deployable class is a wrapper class around a physical archive. Deployable}}s are constructed using a {{DeployableFactory provided by your container. The reason for this factory is to support container extensions to archives (for example, Tomcat supports context.xml files located in your WAR's META-INF directory, JBoss allows for a jboss-web.xml located in your WAR, etc).

The DeployableFactory interface offers different methods for creating Deployable}}s (e.g. {{DeployableFactory.createEAR(String), DeployableFactory.createWAR(String), etc).

Once you have a Deployable instance wrapping your archive, you can tell the Container to deploy it when the container starts. This is achieved by calling the Container.addDeployable(Deployable) API. You can also read how to statically deploy a WAR or how to statically deploy an EAR.

In the near future we'll add support to deploy {{Deployable}}s in a running container (a.k.a. dynamic deployments).

Example using the Java API

Deploying a WAR in Tomcat 5.x:

Example using the Ant API

Depploying a WAR in Tomcat 5.x:

  • No labels