Versions Compared

Key

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

...

Code Block
languagejava
InstalledLocalContainer container = new Resin3xInstalledLocalContainer(
    new Resin3xStandaloneLocalConfiguration("target/myresin3x"));
container.setHome("c:/apps/resin-3.0.18");

container.start();

// Here you are assured the container is started.

Deployable war = new WAR("path/to/simple.war");
Deployer deployer = new ResinInstalledLocalDeployer(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(
    new URL("http://server:port/some/url")));

container.stop();

// Here you are assured the container is stopped.

...