Cargo : Home
![]()
This page last changed on Apr 30, 2005 by vmassol.
MissionCargo is a thin wrapper around existing J2EE containers. It provides different APIs to easily manipulate containers. "Cargo, your container's best friend!"Cargo provides the following APIs:
StatusVersion status (click in the status column to get release notes):
As glitches may happen even after a container is released for the first time, e.g. if a new feature is added to the framework, but not supported by all containers, we encourage you to report your success/failures in the Tested on section.
Architecture
The main Container API objects are:
Feature list
Container supportList of supported containers and the integration points that are implemented for each container (Java API, Ant tasks and Maven plugin). The specified version is the Cargo version where the feature was first made available.
Quick StartThe following examples demonstrate how to configure Resin 3.0.8 to start in target/resin3x and deploy a WAR located in path/to/simple.war. The default port is 8080. Please note that the container.start() and container.stop() methods wait until the container is fully started and fully stopped before continuing. Thus, for any action you are executing after, you are assured the container is completely operational. Static deploymentStatic deployment means that the Deployabe is deployed before the container is started. Container container = new Resin3xContainer(); container.setHomeDir("c:/apps/resin-3.0.8"); Deployable war = container.getDeployableFactory().createWAR("path/to/simple.war"); container.getConfiguration().addDeployable(war); container.start(); // Here you are assured the container is started. container.stop(); // Here you are assured the container is stopped. Dynamic deploymentDynamic deployment means that the Deployable is deployed after the container is started.Container container = new Resin3xContainer(); container.setHomeDir("c:/apps/resin-3.0.8"); container.start(); // Here you are assured the container is started. Deployable war = container.getDeployableFactory().createWAR("path/to/simple.war"); Deployer deployer = new ResinDeployer(container); deployer.deploy(war) // Here you are NOT sure the WAR has finished deploying. To be sure you // need to use a DeployableMonitor to monitor the deployment. For example // the following code deploys the WAR and wait until it is available to // serve requests (the URL should point to a resource inside your WAR): deployer.deploy(war, new URLDeployableMonitor("http://server:port/some/url")); container.stop(); // Here you are assured the container is stopped. ![]() ![]() ![]() ![]() |
![]() |
Document generated by Confluence on Apr 30, 2005 12:52 |