-
Notifications
You must be signed in to change notification settings - Fork 465
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
[WFCORE-3720] Update ServiceModuleLoader to use non-deprecated JBoss Modules APIs #6247
base: main
Are you sure you want to change the base?
Conversation
Core -> Full Integration Build 14045 outcome was FAILURE using a merge of 070bc6a |
Core -> WildFly Preview Integration Build 14122 outcome was FAILURE using a merge of 070bc6a |
Core -> Full Integration Build 14341 outcome was FAILURE using a merge of 070bc6a |
In general ModuleIdentifier.getName() is not a safe replacement for ModuleIdentifier. It does not include any slot value. ModuleIdentifier.toString() provides the String variant of the module id. |
@@ -74,7 +74,7 @@ public void execute(OperationContext context, ModelNode operation) { | |||
moduleIdentifier = deploymentUnit.getAttachment(Attachments.MODULE_IDENTIFIER); | |||
} | |||
|
|||
final ServiceController<?> moduleLoadServiceController = sr.getService(ServiceModuleLoader.moduleServiceName(moduleIdentifier)); | |||
final ServiceController<?> moduleLoadServiceController = sr.getService(ServiceModuleLoader.moduleServiceName(moduleIdentifier.getName())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the changes like this need to be updated to use toString(), not getName().
return name.startsWith(MODULE_PREFIX); | ||
} | ||
|
||
@Deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add forRemoval=true and add javadoc @deprecated pointing to the new method.
Hi @bstansberry, thank you for the review, change requests should be addressed now. |
public ModuleSpec findModule(String name) throws ModuleLoadException { | ||
ServiceController<ModuleDefinition> controller = (ServiceController<ModuleDefinition>) serviceContainer.getService(moduleSpecServiceName(name)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this method should have been deprecated for removal calling internally to the one using the String as an argument. Otherwise, any caller currently using the old one will now be using the one provided by the parent class.
public static ServiceName moduleResolvedServiceName(ModuleIdentifier identifier) { | ||
if (!isDynamicModule(identifier)) { | ||
throw ServerLogger.ROOT_LOGGER.missingModulePrefix(identifier, MODULE_PREFIX); | ||
public static ServiceName moduleResolvedServiceName(String name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This falls into the same category as what was done with ServiceName moduleServiceName(ModuleIdentifier identifier)
and should be deprecated as well, although better to get other feedback since I don't know exactly what was the use case where this can be called from other parties than WildFly
public static boolean isDynamicModule(String name) { | ||
return name.startsWith(MODULE_PREFIX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This falls into the same category as what was done with ServiceName moduleServiceName(ModuleIdentifier identifier)
and should be deprecated as well. Although better to get other feedback since I don't know exactly what was the use case where this can be called from other parties than WildFly
Core -> WildFly Preview Integration Build 14145 outcome was FAILURE using a merge of f2cbe06 Failed tests
|
Thanks @yersan, updated. |
https://issues.redhat.com/browse/WFCORE-3720