[jboss-jira] [JBoss JIRA] (WFLY-6630) "default" as default name for long-running-threads and short-running-threads leads to thread groups with the same name default-threads

Chao Wang (JIRA) issues at jboss.org
Thu May 26 03:27:00 EDT 2016


     [ https://issues.jboss.org/browse/WFLY-6630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chao Wang updated WFLY-6630:
----------------------------
    Attachment: WFLY-6630.patch


The tricky part is that the "default" is also part of service name as added inside [WorkManagerAdd.java|https://github.com/wildfly/wildfly/blob/9de9217e0106da10c7d05228bcf0559c81b6042c/connector/src/main/java/org/jboss/as/connector/subsystems/jca/WorkManagerAdd.java#L79] 

{code:java}
builder.addDependency(ServiceBuilder.DependencyType.OPTIONAL, ThreadsServices.EXECUTOR.append(WORKMANAGER_LONG_RUNNING).append(name), Executor.class, wmService.getExecutorLongInjector());
builder.addDependency(ThreadsServices.EXECUTOR.append(WORKMANAGER_SHORT_RUNNING).append(name), Executor.class, wmService.getExecutorShortInjector());
{code}

and [DistributedWorkManagerAdd.java|https://github.com/wildfly/wildfly/blob/9de9217e0106da10c7d05228bcf0559c81b6042c/connector/src/main/java/org/jboss/as/connector/subsystems/jca/DistributedWorkManagerAdd.java#L153]
{code:java}
builder.addDependency(ServiceBuilder.DependencyType.OPTIONAL, ThreadsServices.EXECUTOR.append(WORKMANAGER_LONG_RUNNING).append(name), Executor.class, wmService.getExecutorLongInjector());
builder.addDependency(ThreadsServices.EXECUTOR.append(WORKMANAGER_SHORT_RUNNING).append(name), Executor.class, wmService.getExecutorShortInjector());
{code}

here, the value of {{name}} is "default" based on default workmanager's name. When I made changes as attached file for default-short-running-threads and default-long-running-threads. The services name are also changed. Which broke a MixedDomainDeployment700TestCase due to "One or more services were unable to start due to one or more indirect dependencies not being available". I have tried to use transformer, but it does not help for these service name change.

> "default" as default name for long-running-threads and short-running-threads leads to thread groups with the same name default-threads 
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-6630
>                 URL: https://issues.jboss.org/browse/WFLY-6630
>             Project: WildFly
>          Issue Type: Enhancement
>    Affects Versions: 10.0.0.Final
>            Reporter: Martin Simka
>            Assignee: Chao Wang
>            Priority: Minor
>         Attachments: WFLY-6630.patch
>
>
> /subsystem=jca/workmanager=default/short-running-threads=default
> /subsystem=jca/workmanager=default/long-running-threads=default
> Thread group with name {{default-threads}} is created for both of these addresses. It's because thread group name is created from last element of resource's address + string {{-threads}}. 
> [ThreadPoolManagementUtils.java#L166|https://github.com/wildfly/wildfly-core/blob/master/threads/src/main/java/org/jboss/as/threads/ThreadPoolManagementUtils.java#L166]
> {code:java}
> params.name = pathAddress.getLastElement().getValue();
> {code}
> [ThreadFactoryResolver.java#L149|https://github.com/wildfly/wildfly-core/blob/master/threads/src/main/java/org/jboss/as/threads/ThreadFactoryResolver.java#L149]
> {code:java}
> protected String getThreadGroupName(String threadPoolName) {
>   return threadPoolName + "-threads";
> }
> {code}
> Thread groups for different resources shouldn't have the same name. Also such a general name {{default-threads}} could be confusing when debugging. 



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list