Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Definition

Excerpt

Re-use an existing container installation

Explanations

An existing configuration plugs itself onto an existing container installation that exists on your hard disk. This is by opposition to the Standalone Local Configuration which creates a new container installation from scratch in a directory of your choice. Existing configurations require that the user creates a valid configuration directory and points Cargo to it.

Support Matrix

Java

Ant

Maven2

IntelliJ IDEA

Netbeans

(tick)

(tick)

(tick)

(question)

(question)

Java API

There are different ways of using an existing configuration:

  • By directly instantiating the configuration matching your container. For example:
Code Block

[...]
Configuration configuration = new ResinExistingLocalConfiguration("target/resin3x");
[...]
  • By using the DefaultConfigurationFactory which automatically maps the right implementation for the container you're using. For example:
Code Block

[...]
ConfigurationFactory factory = new DefaultConfigurationFactory();
Configuration configuration = factory.createConfiguration("resin3x", 
    ContainerType.INSTALLED, ConfigurationFactory.EXISTING, "c:/apps/resin-3.0.9");
[...]

Ant Task

Example:

Code Block
xml
xml

<cargo containerId="resin3x" [...]>
  <configuration type="existing" home="c:/apps/resin-3.0.9"/>
  [...]
</cargo>

Maven2 Plugin

Code Block
xml
xml

[...]
<container>
  <containerId>resin3x</containerId>
  [...]
</container>
<configuration>
  <type>existing</type>
  <home>c:/apps/resin-3.0.9</home>
</configuration>
[...]