private void registerComponents() throws RepositoryConfigurationException, RepositoryException { SecurityHelper.doPrivilegedAction( new PrivilegedAction<Void>() { public Void run() { registerComponentInstance(config); registerComponentImplementation(FileCleanerHolder.class); registerComponentImplementation(LockRemoverHolder.class); return null; } }); registerWorkspacesComponents(); registerRepositoryComponents(); }
/** {@inheritDoc} */ @Override protected Log getLogger(final String name) { Logger slf4jlogger = SecurityHelper.doPrivilegedAction( new PrivilegedAction<Logger>() { public Logger run() { return LoggerFactory.getLogger(name); } }); if (slf4jlogger instanceof LocationAwareLogger) { return new LocationAwareSLF4JExoLog((LocationAwareLogger) slf4jlogger); } else { return new SLF4JExoLog(slf4jlogger); } }
public FtpServerImpl( FtpConfig configuration, CommandService commandService, RepositoryService repositoryService) throws Exception { this.configuration = configuration; this.repositoryService = repositoryService; InputStream commandStream = SecurityHelper.doPrivilegedAction( new PrivilegedAction<InputStream>() { public InputStream run() { return getClass().getResourceAsStream(COMMAND_PATH); } }); commandService.putCatalog(commandStream); commandCatalog = commandService.getCatalog(FtpConst.FTP_COMMAND_CATALOG); }