Cargo : Container Instantiation
This page last changed on May 14, 2011 by alitokmen.
DefinitionCreate a container instance Support Matrix
Java APIIf you're using the Java API there are 2 solutions to instantiate a container:
Container container = new Orion2xLocalContainer(configuration); [...] Container container = new Resin3xLocalContainer(configuration); [...] Container container = new Weblogic8xLocalContainer(configuration); [...] Container container = new TomcatRemoteContainer(configuration);
ContainerFactory factory = new DefaultContainerFactory(); Container container = factory.createContainer("resin3x", ContainerType.INSTALLED, configuration); In general we recommend that you use the factory method to instantiate a container as this makes your code more flexible. The class or container id to use for instantiating a container can be found on each container's documentation page:
Example using Cargo extensionsIf you're using a Cargo extension you'll use the way defined by the extension to instantiate a container. Underneath, all extensions use the factory method to instantiate containers. |
![]() |
Document generated by Confluence on Dec 03, 2011 14:37 |