public ModuleContext(final String id, final URI moduleURI, final String uniqueId, final AppContext appContext, final Context moduleJndiContext, final ClassLoader classLoader) { super(id, appContext.getOptions()); this.moduleURI = moduleURI; this.appContext = appContext; this.moduleJndiContext = moduleJndiContext; this.uniqueId = uniqueId; if (classLoader != null) { this.loader = classLoader; } else { // in tests for instance but shouldn't be the case in main part of the program this.loader = Thread.currentThread().getContextClassLoader(); } }
public ModuleContext(final String id, final URI moduleURI, final String uniqueId, final AppContext appContext, final Context moduleJndiContext, final ClassLoader classLoader) { super(id, appContext.getOptions()); this.moduleURI = moduleURI; this.appContext = appContext; this.moduleJndiContext = moduleJndiContext; this.uniqueId = uniqueId; if (classLoader != null) { this.loader = classLoader; } else { // in tests for instance but shouldn't be the case in main part of the program this.loader = Thread.currentThread().getContextClassLoader(); } }
public static AsynchronousPool create(final AppContext appContext) { final Options options = appContext.getOptions(); final ExecutorBuilder builder = new ExecutorBuilder() .prefix("AsynchronousPool") .size(options.get("AsynchronousPool.Size", 5)) .threadFactory(new DaemonThreadFactory("@Asynchronous", appContext.getId())); return new AsynchronousPool( builder.build(options), options.get("AsynchronousPool.ShutdownWaitDuration", new Duration(1, TimeUnit.MINUTES))); }
public static AsynchronousPool create(final AppContext appContext) { final Options options = appContext.getOptions(); final ExecutorBuilder builder = new ExecutorBuilder() .prefix("AsynchronousPool") .size(options.get("AsynchronousPool.Size", 5)) .threadFactory(new DaemonThreadFactory("@Asynchronous", appContext.getId())); return new AsynchronousPool( builder.build(options), options.get("AsynchronousPool.ShutdownWaitDuration", new Duration(1, TimeUnit.MINUTES))); }