Cargo : Configuration
This page last changed on Apr 25, 2005 by vmassol.
DefinitionSpecifies how the container is configuredExplanationThe notion of Configuration is different from the notion of Installation. Indeed a container is installed in the place where you have installed it (or where the Cargo Installer has installed it).However, it is possible to configure this container to tell it to deploy archives to some custom directory and consider this directory as the new home directory. All containers support this feature. This allows to leave an installed container directory intact (no modifications) and to compartiment all modifications to some directory that you are controlling. Say you wish to automate some functional tests. You can set the new container home to point to your temporary build directory. This is the configuration we call Standalone configuration. By opposition if you choose to use the default configuration that your container has set up when you installed it, it is called an Existing configuration.Please note that at the moment Cargo only implements Standalone configurations for all the supported containers. However, you can create your own implementation if you wish (see below). Custom configurationThe Cargo API allow the user to plug his/her own custom configuration implementation. The only requisites is that the implementation must implements ContainerConfiguration and have 2 constructors: CustomConfiguration(Container) and CustomConfiguration(Container, File homeDir). You can then register your configuration against the ConfigurationFactory class. It's optional and only required if you want to let users use ConfigurationFactory to instantiate your configuration. You would write:ConfigurationFactory factory = new ConfigurationFactory(); factory.registerConfiguration("containerIdOfAssociatedContainer", "customhint", MyCustomConfiguration.class); Where customhint is any value you wish, used to differentiate your configuration from other existing ones associated with the container represented by its id. |
![]() |
Document generated by Confluence on Apr 30, 2005 12:51 |