This page last changed on Nov 26, 2010 by alitokmen.

Definition

Timeout after which the container start/stop is deemed failed

This feature is only available for local containers

Explanation

Cargo has a timeout for container start and stop operations. If the time taken to start/stop a container exceeds the timeout period the operations is considered failed and the container is then set in the unknown state.

The default timeout value is 2 minutes (120000 milliseconds). This value can be modified as shown below.

If the given timeout is to small, the CARGO container will give you an error message similar to this:
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to start the JBoss 5.1.0 container.
Deployable http://localhost:8080/cargocpc/index.html failed to finish deploying
within the timeout period [5000]. The Deployable state is thus unknown.
[INFO] ------------------------------------------------------------------------

Example using the Java API

LocalContainer container = ...;
container.setTimeout(180000L);
System.out.println("Timeout = " + container.getTimeout());

Example using the Maven 2 plugin

<container>
  [...]
  <timeout>180000</timeout>
  [...]
</container>

Disabling timeout

As of CARGO version 1.0.2, if you set the timeout to 0, CARGO will not wait for the container to start or stop.

Document generated by Confluence on Feb 24, 2011 19:55