use of org.jboss.as.controller.SubsystemRegistration 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.controller.SubsystemRegistration in project wildfly by wildfly.
the class BeanValidationExtension method initialize.
@Override
public void initialize(final ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(BeanValidationRootDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE, false);
subsystem.registerXMLElementWriter(BeanValidationSubsystemParser.INSTANCE);
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class BatchSubsystemExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(BatchSubsystemDefinition.NAME, CURRENT_MODEL_VERSION);
subsystem.registerSubsystemModel(BatchSubsystemDefinition.INSTANCE);
subsystem.registerXMLElementWriter(BatchSubsystemParser.INSTANCE);
// Register the deployment resources
if (context.isRuntimeOnlyRegistrationValid()) {
final SimpleResourceDefinition deploymentResource = new SimpleResourceDefinition(new SimpleResourceDefinition.Parameters(BatchSubsystemDefinition.SUBSYSTEM_PATH, BatchResourceDescriptionResolver.getResourceDescriptionResolver("deployment")).setRuntime());
final ManagementResourceRegistration deployments = subsystem.registerDeploymentModel(deploymentResource);
final ManagementResourceRegistration jobRegistration = deployments.registerSubModel(BatchJobResourceDefinition.INSTANCE);
jobRegistration.registerSubModel(new BatchJobExecutionResourceDefinition());
}
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class SingletonExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME, SingletonModel.CURRENT.getVersion());
new SingletonResourceDefinition().register(registration);
registration.registerXMLElementWriter(new SingletonXMLWriter());
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class EJB3Extension method initialize.
/**
* {@inheritDoc}
*/
@Override
public void initialize(ExtensionContext context) {
final boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid();
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
subsystem.registerXMLElementWriter(EJB3SubsystemXMLPersister.INSTANCE);
PathManager pathManager = context.getProcessType().isServer() ? context.getPathManager() : null;
subsystem.registerSubsystemModel(new EJB3SubsystemRootResourceDefinition(registerRuntimeOnly, pathManager));
if (registerRuntimeOnly) {
ResourceDefinition deploymentsDef = new SimpleResourceDefinition(PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, SUBSYSTEM_NAME), getResourceDescriptionResolver("deployed"));
final ManagementResourceRegistration deploymentsRegistration = subsystem.registerDeploymentModel(deploymentsDef);
deploymentsRegistration.registerSubModel(MessageDrivenBeanResourceDefinition.INSTANCE);
deploymentsRegistration.registerSubModel(SingletonBeanDeploymentResourceDefinition.INSTANCE);
deploymentsRegistration.registerSubModel(StatelessSessionBeanDeploymentResourceDefinition.INSTANCE);
deploymentsRegistration.registerSubModel(StatefulSessionBeanDeploymentResourceDefinition.INSTANCE);
}
// Transformers
if (context.isRegisterTransformers()) {
EJB3SubsystemRootResourceDefinition.registerTransformers(subsystem);
}
}
Aggregations