This page last changed on Apr 29, 2005 by vmassol.

Definition

Configures your container in a specific directory

Explanation

The standalone configuration allows configuring your container so that it is setup to start in a directory you choose (see the configuration page for more general explanations).

There are 2 ways of using a standalone configuration:

  • By directly instantiating the configuration matching your container. For example:
[...]
Configuration configuration = new CatalinaStandaloneConfiguration(container, "target/tomcat5x");
container.setConfiguration(configuration);
[...]

  • By using the ConfigurationFactory which automatically maps the right implementation for the container you're using. For example:
[...]
ConfigurationFactory factory = new ConfigurationFactory();
Configuration configuration = factory.createConfiguration(container, ConfigurationFactory.STANDALONE, "target/tomcat5x");
container.setConfiguration(configuration);
[...]

Note that if you don't specify any configuration, Cargo will use a standalone configuration by default and the target directory will point to a directory named after your container's id in your user's temporary directory.

Example using the Ant API

<cargo-tomcat5x [...]>
  <configuration hint="standalone" dir="target/tomcat5x"/>
  [...]
</cargo-tomcat5x>
Document generated by Confluence on Apr 30, 2005 12:52