Brian Stansberry created WFLY-14273:
---------------------------------------
Summary: Avoid need for unique names for resource-adapter child resources
that provide statistics
Key: WFLY-14273
URL:
https://issues.redhat.com/browse/WFLY-14273
Project: WildFly
Issue Type: Enhancement
Components: JCA, Management
Reporter: Brian Stansberry
Assignee: Tomasz Adamski
Say your configuration has multiple resource-adapter resources, e.g. "my.rar.1",
"my.rar.2" etc. And say each of those has a connection-definition resource,
each of which has pool-name 'MyConnectionDefinition'. That's a legitimate
naming pattern. But because of the way the ManagementResourceRegistration for the RA
statistics is registered, there is a race condition that can lead to intermittent failures
at boot like the following:
{code}
2021-01-06 10:43:40,113 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5)
MSC000001: Failed to start service
jboss.resourceadapters.ra."my.rar".MyConnectionDefinition.STATISTICS:
org.jboss.msc.service.StartException in service
jboss.resourceadapters.ra."my.rar.1".MyConnectionDefinition.STATISTICS: Failed
to start service
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731)
at
org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: WFLYCTL0218: A node is already registered
at
'/subsystem=resource-adapters/resource-adapter=*/connection-definitions=MyConnectionDefinition/statistics=pool'
at
org.jboss.as.controller.registry.NodeSubregistry.registerChild(NodeSubregistry.java:106)
at
org.jboss.as.controller.registry.ConcreteResourceRegistration.registerSubModel(ConcreteResourceRegistration.java:239)
at
org.jboss.as.connector.services.resourceadapters.statistics.ConnectionDefinitionStatisticsService.start(ConnectionDefinitionStatisticsService.java:126)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
{code}
I believe a similar thing could happen with 'admin-object' resources.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)