use of org.jboss.as.clustering.controller.DeploymentChainContributingResourceRegistration in project wildfly by wildfly.
the class InfinispanSubsystemResourceDefinition method register.
@Override
public void register(SubsystemRegistration parentRegistration) {
ManagementResourceRegistration registration = parentRegistration.registerSubsystemModel(this);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addCapabilities(LOCAL_CLUSTERING_CAPABILITIES.values()).addCapabilities(CLUSTERING_CAPABILITIES.values());
ResourceServiceHandler handler = new InfinispanSubsystemServiceHandler();
new DeploymentChainContributingResourceRegistration(descriptor, handler, target -> target.addDeploymentProcessor(InfinispanExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_CLUSTERING, new ClusteringDependencyProcessor())).register(registration);
new CacheContainerResourceDefinition(this.pathManager, this.allowRuntimeOnlyRegistration).register(registration);
}
use of org.jboss.as.clustering.controller.DeploymentChainContributingResourceRegistration in project wildfly by wildfly.
the class SingletonResourceDefinition method register.
@Override
public void register(SubsystemRegistration parentRegistration) {
ManagementResourceRegistration registration = parentRegistration.registerSubsystemModel(this);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
ResourceDescriptor descriptor = new ResourceDescriptor(this.getResourceDescriptionResolver()).addAttributes(Attribute.class).addCapabilities(Capability.class);
ResourceServiceHandler handler = new SingletonServiceHandler();
new DeploymentChainContributingResourceRegistration(descriptor, handler, target -> {
for (SingletonDeploymentSchema schema : SingletonDeploymentSchema.values()) {
target.addDeploymentProcessor(SingletonExtension.SUBSYSTEM_NAME, Phase.STRUCTURE, Phase.STRUCTURE_REGISTER_JBOSS_ALL_SINGLETON_DEPLOYMENT, new JBossAllXmlParserRegisteringProcessor<>(schema.getRoot(), SingletonDeploymentDependencyProcessor.CONFIGURATION_KEY, new SingletonDeploymentXMLReader(schema)));
}
target.addDeploymentProcessor(SingletonExtension.SUBSYSTEM_NAME, Phase.PARSE, Phase.PARSE_SINGLETON_DEPLOYMENT, new SingletonDeploymentParsingProcessor());
target.addDeploymentProcessor(SingletonExtension.SUBSYSTEM_NAME, Phase.DEPENDENCIES, Phase.DEPENDENCIES_SINGLETON_DEPLOYMENT, new SingletonDeploymentDependencyProcessor());
target.addDeploymentProcessor(SingletonExtension.SUBSYSTEM_NAME, Phase.CONFIGURE_MODULE, Phase.CONFIGURE_SINGLETON_DEPLOYMENT, new SingletonDeploymentProcessor());
}).register(registration);
new SingletonPolicyResourceDefinition().register(registration);
}
Aggregations