[
https://issues.jboss.org/browse/WFCORE-170?page=com.atlassian.jira.plugin...
]
Brian Stansberry closed WFCORE-170.
-----------------------------------
Fix Version/s: (was: 3.0.0.Alpha1)
Resolution: Won't Do
ServerService (or HostControllerService on an HC) installs a
Service<ScheduledExecutorService> but I don't think it' a good idea to treat
this as a globally available resource. ScheduledThreadPoolExecutor is a fixed size thread
pool, and if there aren't enough threads to process tasks, task execution will be
delayed. This makes ScheduledThreadPoolExecutor unsuitable for arbitrary use, since the
appropriate pool size is unknowable.
It's fine to consider using ServerService's pool for other uses in the kernel, but
only with care about the pool size considerations. And I don't think it should be used
outside the kernel. For example there can be multiple instances of
DeploymentScannerService, and those execute tasks that may block for considerable
periods.
Create a shared ScheduledExecutorService
----------------------------------------
Key: WFCORE-170
URL:
https://issues.jboss.org/browse/WFCORE-170
Project: WildFly Core
Issue Type: Feature Request
Components: Server
Reporter: Brian Stansberry
Assignee: Brian Stansberry
There are number of ScheduledExecutorService instances being created around wf-core.
Create a single service and inject it.
This will reduce resource usage by creating fewer threads, and will reduce the risk of
code mistakes around shutting down the various executors,
I see these used in:
LdapCacheService
RemoteDomainConnectionService
DeploymentMountProvider
DeploymentScannerService
plus the operation response attachment stuff I'm doing will need one.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)