This page last changed on Jul 17, 2005 by vmassol.

Definition

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 Configuration which creates a new container installation from scratch in a directory of your choice.

There are different ways of using an existing configuration:

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

Container container = new Resin3xContainer(configuration);
[...]
  • By using the DefaultConfigurationFactory which automatically maps the right implementation for the container you're using. For example:
[...]
ConfigurationFactory factory = new DefaultConfigurationFactory();
Configuration configuration = factory.createConfiguration("resin3x", 
    ConfigurationFactory.EXISTING, "c:/apps/resin-3.0.9");

Container container = new Resin3xContainer(configuration);
[...]
  • By using the DefaultContainerFactory which has a constructor for creating a Container and a Configuration at the same time. For example:
[...]
ContainerFactory factory = new DefaultContainerFactory();
Container container = factory.createContainer("resin3x", 
    ConfigurationFactory.EXISTING, "c:/apps/resin-3.0.9");
[...]

Example using the Ant API

<cargo-resin3x [...]>
  <configuration hint="existing" dir="c:/apps/resin-3.0.9"/>
  [...]
</cargo-resin3x>
Document generated by Confluence on Jul 21, 2005 06:52