Brian Stansberry created WFCORE-2829:
----------------------------------------
Summary: Expose the ProcessType via the ManagementResourceRegistration
Key: WFCORE-2829
URL:
https://issues.jboss.org/browse/WFCORE-2829
Project: WildFly Core
Issue Type: Bug
Components: Domain Management
Reporter: Brian Stansberry
Assignee: Brian Stansberry
An Extension needs to be usable both on a HostController (for registering the subsystem
management model for use in domain profiles) and on a server. But the API exposed by the
Extension can differ in the two cases, as there are no runtime services behind a domain
profile resource, while there usually are behind a server resource. So the Extension
implementation needs to behave differently depending on the type of process it is running
in.
To support this, the ExtensionContext provided to the Extension exposes the ProcessType.
But this isn't particularly friendly, as that forces the Extension impl to provide
that ProcessType to its ResourceDefinition impls, and those are typically created in a
tree with the Extension impl only creating the root. So lots of custom constructors
passing a ProcessType down the tree.
If ManagementResourceRegistration exposed the ProcessType, then the ResourceDefinition
impls could directly read it when deciding what
attributes/operations/children/notifications to register.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)