private void initialize() throws RuntimeException { try { this.properties = new LimbusProperties(filesystem, PluginClassLoader.class, true, false); } catch (Exception e) { throw new RuntimeException("Cannot get properties for plugin classloader.", e); } // Collect the set of permissions required to access every code source within this classpath for (URL url : urls) { try { Permission permission = url.openConnection() .getPermission(); if (permission != null) { codeSourcePermissions.add(permission); } } catch (IOException e) { throw new RuntimeException( String.format("Cannot request required permissions to connect to the URL %s", url.toString()), e); } } }
@Override protected void performInitialize() throws Exception { LimbusProperties properties = new LimbusProperties(filesystem, TaskSchedulerImpl.class, true, false); int threadCount = properties.getInt(PERIODIC_TASKS_THREAD_POOL_SIZE); this.shutdownTimeout = properties.getLong(SHUTDOWN_TIMEOUT); this.shutdownTimeoutUnit = properties.getEnum(SHUTDOWN_TIMEOUT_UNIT, TimeUnit.class); // extra scheduler for cyclical call of commands so that the scheduler can be stopped separately scheduler = Executors.newScheduledThreadPool(threadCount, this); this.tasks = new ConcurrentHashMap<Task, TaskExecution>(); }
public LimbusSecurityManager(LimbusFileService filesystem) { Lang.denyNull("filesystem", filesystem); try { this.properties = new LimbusProperties(filesystem, LimbusSecurityManager.class, true, false); } catch (Exception e) { throw new LimbusSecurityException( "Cannot initialize Limbus Security Manager due to missing default configuration."); } init(); }
@Override protected void performInitialize() throws LimbusException { try { // Create the properties this.properties = new LimbusProperties(filesystem, getClass(), true, false); // Register as a deployment listener container.addDeploymentListener(this); // When created by the container, clean old deployments cleanWorkDirectory(); // Make sure work folder is available getCreateOrFailWorkDirectory(); // Make sure deploy folder is available getCreateOrFailDeployDirectory(); // Start hot deploy listener startFileDeployWatchService(); // Deploy all artifacts from deploy directory. deployAll(); } catch (Exception e) { throw new LimbusException("Cannot initialize Limbus Deploy Service.", e); } }