Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue_72] Remove unneeded passing of ATTRIBUTES to the AbstractBoott… #79

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

bstansberry
Copy link
Contributor

…imeAddStepHandler c'tor

Resolves #72

@WolfgangHG
Copy link
Contributor

Is it really this trivial ;-)? Would attributes defined in

static final AttributeDefinition[] ATTRIBUTES = { /* you can include attributes here */ };
still work?
The "JaxrsSubsystemDefinition" that I linked in #72 added an override "registerAttributes", but it also has a different base class.

I don't know enough of the subsystem internals, so I don't have a sample for attributes.

@bstansberry
Copy link
Contributor Author

@WolfgangHG Yes, it's really that trivial. :-)

The 'registerAttributes' stuff you see in JaxrsSubsystemDefinition is handled for the archetype-generated subsystem by SubsystemDefinition's superclass.

Because the attributes are registered with the ManagementResourceRegistration, a typical add handler really shouldn't need to have the attributes provided to it via it's constructor, as it can get them from the ManagementResourceRegistration. So we implemented that and we've been deprecating and later removing code that assumes it's necessary to pass in attributes.

I created a project from the archetype and added an attribute to SubsystemDefinition.ATTRIBUTES (and other necessary places unrelated to this issue) and it works fine.

@bstansberry bstansberry merged commit 439c2c6 into wildfly:main Feb 14, 2024
1 check passed
@bstansberry bstansberry deleted the Issue_72 branch February 14, 2024 22:14
@bstansberry
Copy link
Contributor Author

Thanks @WolfgangHG and @jamezp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecation warning in subsystem archetype for 31.0.0.Beta1
3 participants