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 4 Next »


Performs a hot deployment of a Deployable


TODO: Explain differences between local deployers and remote deployers.

You use a Deployer when you wish to deploy a Deployable into a running container (this is known as Hot Deployment). To instantiate a Deployer you need to know its class name. A Deployer is specific to a container (you can find the class names on the container page listing all containers).

The deployment is done using one of the Deployer.deploy(...) APIs. Some deploy(...) signatures accept a DeployableMonitor which is used to wait till the container has not finished deploying. Cargo currently offers a URLDeployableMonitor which waits by polling a provided URL (see below in the example). Whent the URL becomes available the monitor considers that the Deployable is fully deployed. In the future, Cargo will provide other DeployableMonitor such as a Jsr88DeployableMonitor.

Example using the Java API

Example without using a DeployableMonitor

Hot-deploying a WAR on Resin 3.0.9 without waiting for the deployment to finish:

Please note that the Deployer.deploy() method call does not wait for the Deployable to be fully deployed before returning.

Example using a URLDeployableMonitor

Hot-deploying an WAR on Resin 3.0.9 and waiting for the deployment to finish:

The http://server:port/some/url must point to a resource that is serviced by the Deployable being deployed.

Example using the Ant API

There's currently no Ant task for performing hot deployments.

  • No labels