Deployment deployment = factory.createDeployment(protocolUri, username, password);
return new OpenEJBDeploymentManager(deployment);
} catch (RuntimeException e) {
// some DeploymentManagerFactories suppress unchecked exceptions - log and rethrow
DeploymentManagerCreationException creationException = new DeploymentManagerCreationException("Unexpected exception while creating deployment manager");
creationException.initCause(e);
throw creationException;
} catch (AssertionError e) {
// some DeploymentManagerFactories suppress unchecked exceptions - log and rethrow
DeploymentManagerCreationException creationException = new DeploymentManagerCreationException("Assertion error while creating deployment manager");
creationException.initCause(e);