UploadListener uploadListener = new UploadListener(couchDd,repositoryDir);
servletContext.setAttribute(UploadServlet.OnUploadedListenerAttributeName, uploadListener);
OnUploadedListenerSingleton.configure(uploadListener);
try {
UploadWorkerSettings settings = new UploadWorkerSettings(props);
settings.setAtlasName(atlasProperties.getAtlasName());
uploadWorker = new UploadWorker(settings);
uploadWorker.setDesignDocument(couchDd);
uploadWorker.setMediaDir(repositoryDir);
uploadWorker.setMailNotification(mailNotification);