Source:
<code>public void initialize(ExtensionContext context) { final SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION); <START> subsystemRegistration.registerXMLElementWriter(MessagingSubsystemParser_3_0::new); <END> boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid(); final ManagementResourceRegistration subsystem = subsystemRegistration.registerSubsystemModel(MessagingSubsystemRootResourceDefinition.INSTANCE); subsystem.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE); final ManagementResourceRegistration server = subsystem.registerSubModel(new ServerDefinition(registerRuntimeOnly)); for (PathDefinition path : new PathDefinition[] { PathDefinition.JOURNAL_INSTANCE, PathDefinition.BINDINGS_INSTANCE, PathDefinition.LARGE_MESSAGES_INSTANCE, PathDefinition.PAGING_INSTANCE }) { ManagementResourceRegistration pathRegistry = server.registerSubModel(path); PathDefinition.registerResolveOperationHandler(context, pathRegistry); } subsystem.registerSubModel(JMSBridgeDefinition.INSTANCE); if (registerRuntimeOnly) { final ManagementResourceRegistration deployment = subsystemRegistration.registerDeploymentModel(new SimpleResourceDefinition(SUBSYSTEM_PATH, getResourceDescriptionResolver("deployed"))); final ManagementResourceRegistration deployedServer = deployment.registerSubModel(new SimpleResourceDefinition(SERVER_PATH, getResourceDescriptionResolver(SERVER))); deployedServer.registerSubModel(new JMSQueueDefinition(true, registerRuntimeOnly)); deployedServer.registerSubModel(new JMSTopicDefinition(true, registerRuntimeOnly)); deployedServer.registerSubModel(PooledConnectionFactoryDefinition.DEPLOYMENT_INSTANCE); } }</code><technical_language>Please new MessagingSubsystemParser_3_0(). method reference prevent loading of class, add more metaspace overhead a constructed instance adds heap</technical_language>

Target:
public void initialize(ExtensionContext context) { final SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION); subsystemRegistration.registerXMLElementWriter(PARSER); boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid(); final ManagementResourceRegistration subsystem = subsystemRegistration.registerSubsystemModel(MessagingSubsystemRootResourceDefinition.INSTANCE); subsystem.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE); final ManagementResourceRegistration server = subsystem.registerSubModel(new ServerDefinition(registerRuntimeOnly)); for (PathDefinition path : new PathDefinition[] { PathDefinition.JOURNAL_INSTANCE, PathDefinition.BINDINGS_INSTANCE, PathDefinition.LARGE_MESSAGES_INSTANCE, PathDefinition.PAGING_INSTANCE }) { ManagementResourceRegistration pathRegistry = server.registerSubModel(path); PathDefinition.registerResolveOperationHandler(context, pathRegistry); } subsystem.registerSubModel(JMSBridgeDefinition.INSTANCE); if (registerRuntimeOnly) { final ManagementResourceRegistration deployment = subsystemRegistration.registerDeploymentModel(new SimpleResourceDefinition(SUBSYSTEM_PATH, getResourceDescriptionResolver("deployed"))); final ManagementResourceRegistration deployedServer = deployment.registerSubModel(new SimpleResourceDefinition(SERVER_PATH, getResourceDescriptionResolver(SERVER))); deployedServer.registerSubModel(new JMSQueueDefinition(true, registerRuntimeOnly)); deployedServer.registerSubModel(new JMSTopicDefinition(true, registerRuntimeOnly)); deployedServer.registerSubModel(PooledConnectionFactoryDefinition.DEPLOYMENT_INSTANCE); } }