private static ThreadPoolType initThreadPoolType(WeldConfiguration configuration) { String threadPoolTypeString = configuration.getStringProperty(ConfigurationKey.EXECUTOR_THREAD_POOL_TYPE); if (threadPoolTypeString.isEmpty()) { // do not create ExecutorServices by default if we do not have the "modifyThreadGroup" permission return Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP) ? ThreadPoolType.FIXED : ThreadPoolType.NONE; } else { try { return ThreadPoolType.valueOf(threadPoolTypeString); } catch (Exception e) { throw BootstrapLogger.LOG.invalidThreadPoolType(threadPoolTypeString); } } }
private static ThreadPoolType initThreadPoolType(WeldConfiguration configuration) { String threadPoolTypeString = configuration.getStringProperty(ConfigurationKey.EXECUTOR_THREAD_POOL_TYPE); if (threadPoolTypeString.isEmpty()) { // do not create ExecutorServices by default if we do not have the "modifyThreadGroup" permission return Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP) ? ThreadPoolType.FIXED : ThreadPoolType.NONE; } else { try { ThreadPoolType threadPoolType = ThreadPoolType.valueOf(threadPoolTypeString); if (System.getSecurityManager() != null && ThreadPoolType.COMMON == threadPoolType) { threadPoolType = ThreadPoolType.FIXED; BootstrapLogger.LOG.commonThreadPoolWithSecurityManagerEnabled(threadPoolType); } return threadPoolType; } catch (Exception e) { throw BootstrapLogger.LOG.invalidThreadPoolType(threadPoolTypeString); } } }
private static ThreadPoolType initThreadPoolType(WeldConfiguration configuration) { String threadPoolTypeString = configuration.getStringProperty(ConfigurationKey.EXECUTOR_THREAD_POOL_TYPE); if (threadPoolTypeString.isEmpty()) { // do not create ExecutorServices by default if we do not have the "modifyThreadGroup" permission return Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP) ? ThreadPoolType.FIXED : ThreadPoolType.NONE; } else { try { ThreadPoolType threadPoolType = ThreadPoolType.valueOf(threadPoolTypeString); if (System.getSecurityManager() != null && ThreadPoolType.COMMON == threadPoolType) { threadPoolType = ThreadPoolType.FIXED; BootstrapLogger.LOG.commonThreadPoolWithSecurityManagerEnabled(threadPoolType); } return threadPoolType; } catch (Exception e) { throw BootstrapLogger.LOG.invalidThreadPoolType(threadPoolTypeString); } } }
private static ThreadPoolType initThreadPoolType(WeldConfiguration configuration) { String threadPoolTypeString = configuration.getStringProperty(ConfigurationKey.EXECUTOR_THREAD_POOL_TYPE); if (threadPoolTypeString.isEmpty()) { // do not create ExecutorServices by default if we do not have the "modifyThreadGroup" permission return Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP) ? ThreadPoolType.FIXED : ThreadPoolType.NONE; } else { try { ThreadPoolType threadPoolType = ThreadPoolType.valueOf(threadPoolTypeString); if (System.getSecurityManager() != null && ThreadPoolType.COMMON == threadPoolType) { threadPoolType = ThreadPoolType.FIXED; BootstrapLogger.LOG.commonThreadPoolWithSecurityManagerEnabled(threadPoolType); } return threadPoolType; } catch (Exception e) { throw BootstrapLogger.LOG.invalidThreadPoolType(threadPoolTypeString); } } }
private static ThreadPoolType initThreadPoolType(WeldConfiguration configuration) { String threadPoolTypeString = configuration.getStringProperty(ConfigurationKey.EXECUTOR_THREAD_POOL_TYPE); if (threadPoolTypeString.isEmpty()) { // do not create ExecutorServices by default if we do not have the "modifyThreadGroup" permission return Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP) ? ThreadPoolType.FIXED : ThreadPoolType.NONE; } else { try { ThreadPoolType threadPoolType = ThreadPoolType.valueOf(threadPoolTypeString); if (System.getSecurityManager() != null && ThreadPoolType.COMMON == threadPoolType) { threadPoolType = ThreadPoolType.FIXED; BootstrapLogger.LOG.commonThreadPoolWithSecurityManagerEnabled(threadPoolType); } return threadPoolType; } catch (Exception e) { throw BootstrapLogger.LOG.invalidThreadPoolType(threadPoolTypeString); } } }
private static ThreadPoolType initThreadPoolType(WeldConfiguration configuration) { String threadPoolTypeString = configuration.getStringProperty(ConfigurationKey.EXECUTOR_THREAD_POOL_TYPE); if (threadPoolTypeString.isEmpty()) { // do not create ExecutorServices by default if we do not have the "modifyThreadGroup" permission return Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP) ? ThreadPoolType.FIXED : ThreadPoolType.NONE; } else { try { ThreadPoolType threadPoolType = ThreadPoolType.valueOf(threadPoolTypeString); if (System.getSecurityManager() != null && ThreadPoolType.COMMON == threadPoolType) { threadPoolType = ThreadPoolType.FIXED; BootstrapLogger.LOG.commonThreadPoolWithSecurityManagerEnabled(threadPoolType); } return threadPoolType; } catch (Exception e) { throw BootstrapLogger.LOG.invalidThreadPoolType(threadPoolTypeString); } } }
if (preloaderThreadPoolSize > 0 && Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP)) { preloader = new ContainerLifecycleEventPreloader(preloaderThreadPoolSize, observerNotificationService.getGlobalLenientObserverNotifier());
if (preloaderThreadPoolSize > 0 && Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP)) { preloader = new ContainerLifecycleEventPreloader(preloaderThreadPoolSize, observerNotificationService.getGlobalLenientObserverNotifier());
if (preloaderThreadPoolSize > 0 && Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP)) { preloader = new ContainerLifecycleEventPreloader(preloaderThreadPoolSize, observerNotificationService.getGlobalLenientObserverNotifier());
if (preloaderThreadPoolSize > 0 && Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP)) { preloader = new ContainerLifecycleEventPreloader(preloaderThreadPoolSize, observerNotificationService.getGlobalLenientObserverNotifier());
if (preloaderThreadPoolSize > 0 && Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP)) { preloader = new ContainerLifecycleEventPreloader(preloaderThreadPoolSize, observerNotificationService.getGlobalLenientObserverNotifier());
if (preloaderThreadPoolSize > 0 && Permissions.hasPermission(Permissions.MODIFY_THREAD_GROUP)) { preloader = new ContainerLifecycleEventPreloader(preloaderThreadPoolSize, observerNotificationService.getGlobalLenientObserverNotifier());