/*
DeployCommandParameters deployCommandParameters = new DeployCommandParameters();
deployCommandParameters.contextroot = this.appDescriptor.getContextPath();
String name = server.getDeployer().deploy(war, deployCommandParameters);
*/
Deployer deployer = glassfish.getDeployer();
// Deploy my scattered web application
//deployer.deploy(archive.toURI());
if (warArchive == null) {
LOGGER.info("warArchive is null, nothing deployed");
} else {
LOGGER.info("About to deploy [" + warArchive.toURI().toString() + "] from path [" + warArchive.toURI().getPath() + "] to EmbeddedGlassFish instance [" + deployer.toString() + "] with context-root set to [" + this.appDescriptor.getContextPath() + "]");
String deployedApp = deployer.deploy(warArchive.toURI());
LOGGER.info("Deployed [" + deployedApp + "] to EmbeddedGlassFish instance [" + deployer.toString() + "] with context-root set to [" + this.appDescriptor.getContextPath() + "]");
}
} catch (org.glassfish.embeddable.GlassFishException ex) {
LOGGER.info("Caught GlassFishException [" + ex.getMessage() + "] trying to start the embedded server instance");
throw new TestContainerException(ex);
} catch (java.io.IOException ioe) {