Introduction
The Cargo Daemon is a Web-based application that uses the Cargo API to configure, start and stop containers on a remote machine.
...
It can be accessed using a browser-based UI, via Java API or Maven2 plugin.
Why use the Cargo Daemon?
Most web containers (e.g. Tomcat, Jetty) provide built-in remote deployment facilities already, also many of them already have daemon integrations; so why use the Cargo Daemon?
- During intense redeployment (i.e., testing and even sometimes QA or production hot deployments): All of the remote deployment facilities that keep the JVM alive will eventually suffer from the dreaded
java.lang.OutOfMemoryError: PermGen spaceexception if something in the web application is leaking memory.
Most web containers try their best to track down these 'dead' objects and forcefully remove them, but it does not always succeed to reclaim the memory. With a leaking web application, the available memory starts to shrink after each redeploy, and eventually the memory is exhausted.
The only solution to this is to kill the JVM, and restart it. And that is exactly what the Cargo Daemon tries to manage. It will try to shutdown the web application cleanly, but if that fails it will forcefully kill the JVM.
It is the only way to guarantee that a new version of your web application always starts when you want it to. - In heterogeneous environments: With Cargo, the way you configure the container is independent from the underlying server -you can set the different configuration properties, define datasources, add deployables, etc. transparently. You can therefore use the Cargo Daemon as a container-independent daemon, with support for the generation of the proper configuration on all supported containers.
- During upgrades and/or application server product evaluations: As Cargo is not dependent on the application server nor on its version, you can easily reuse an existing Cargo Daemon setup to use it for another version of a container, or another container altogether; without having to worry about understanding how to configure it.
Table of Contents
The documentatation for the Cargo Daemon includes:
- Installation: explains how to install and run the daemon
- Getting started: very quick guide on using the daemon
...
- To start a container, fill in the form and press Submit Start:

- To stop, restart, delete or view logs of a container, use the actions on the containers list:

- The Cargo Daemon keeps a persistent record on disk of all the containers that have been submitted. Containers that have been submitted will stay in the list, even when they are stopped. This allows you to manually restart them, or view the logs even after the container is stopped.
- If you want the container to be removed from the list, simply press the delete button.
- Containers can also be submitted with the
autostartproperty (currently only via the Java API or the Maven2/Maven3 plugin), this will automatically restart the container if the daemon notices it is stopped.
...
- The details of the Java API can be seen on the Javadoc for o.c.c.tools.daemon.DaemonClient
- The details of the configuration for the Maven2/Maven3 plugin is documented in the Daemon configuration section of the Maven2/Maven3 plugin reference guide and the example can be seen via the Daemon archetype.
| Info | ||
|---|---|---|
| ||
In order to connect to the Daemon via Java API or Maven2/Maven3 plugin, the minimum requirement is Java version 5. To get the required libraries for using the Daemon via Java API, please check the Downloads page. |