// now that everything is configured, deploy to the container
if (start) {
// deploy
for (BeanContext deployment : allDeployments) {
try {
Container container = deployment.getContainer();
container.deploy(deployment);
if (!((String) deployment.getDeploymentID()).endsWith(".Comp")
&& !deployment.isHidden()) {
logger.info("createApplication.createdEjb", deployment.getDeploymentID(), deployment.getEjbName(), container.getContainerID());
}
if (logger.isDebugEnabled()) {
for (Map.Entry<Object, Object> entry : deployment.getProperties().entrySet()) {
logger.info("createApplication.createdEjb.property", deployment.getEjbName(), entry.getKey(), entry.getValue());
}
}
} catch (Throwable t) {
throw new OpenEJBException("Error deploying '"+deployment.getEjbName()+"'. Exception: "+t.getClass()+": "+t.getMessage(), t);
}
}
// start
for (BeanContext deployment : allDeployments) {
try {
Container container = deployment.getContainer();
container.start(deployment);
if (!((String) deployment.getDeploymentID()).endsWith(".Comp")
&& !deployment.isHidden()) {
logger.info("createApplication.startedEjb", deployment.getDeploymentID(), deployment.getEjbName(), container.getContainerID());
}
} catch (Throwable t) {
throw new OpenEJBException("Error starting '"+deployment.getEjbName()+"'. Exception: "+t.getClass()+": "+t.getMessage(), t);
}
}