* @throws DeploymentException for any error
*/
protected void addDeployment(Deployment deployment, boolean addToDeploy) throws DeploymentException
{
if (deployment == null)
throw new DeploymentException("Null context");
lockRead();
try
{
if (shutdown.get())
throw new DeploymentException("The main deployer is shutdown");
String name = deployment.getName();
log.debug("Add deployment: " + name);
// only try to recognize non re-deployments