Search in sources :

Example 41 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class PojoExtension method initialize.

/**
     * {@inheritDoc}
     */
@Override
public void initialize(ExtensionContext context) {
    final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
    final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(PojoResource.INSTANCE);
    registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
    subsystem.registerXMLElementWriter(parser);
}
Also used : ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Example 42 with SubsystemRegistration

use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.

the class EeExtension method initialize.

/**
     * {@inheritDoc}
     */
@Override
public void initialize(ExtensionContext context) {
    final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
    // Register the root subsystem resource.
    final ManagementResourceRegistration rootResource = subsystem.registerSubsystemModel(EeSubsystemRootResource.create());
    // Mandatory describe operation
    rootResource.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
    // register submodels
    rootResource.registerSubModel(ContextServiceResourceDefinition.INSTANCE);
    rootResource.registerSubModel(ManagedThreadFactoryResourceDefinition.INSTANCE);
    rootResource.registerSubModel(ManagedExecutorServiceResourceDefinition.INSTANCE);
    rootResource.registerSubModel(ManagedScheduledExecutorServiceResourceDefinition.INSTANCE);
    rootResource.registerSubModel(new DefaultBindingsResourceDefinition(new DefaultBindingsConfigurationProcessor()));
    subsystem.registerXMLElementWriter(EESubsystemXmlPersister.INSTANCE);
    if (context.isRegisterTransformers()) {
        registerTransformers(subsystem);
    }
}
Also used : ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) DefaultBindingsConfigurationProcessor(org.jboss.as.ee.component.deployers.DefaultBindingsConfigurationProcessor) SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Aggregations

SubsystemRegistration (org.jboss.as.controller.SubsystemRegistration)42 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)32 RequirementCapability (org.jboss.as.clustering.controller.RequirementCapability)3 ResourceDescriptor (org.jboss.as.clustering.controller.ResourceDescriptor)3 ResourceServiceHandler (org.jboss.as.clustering.controller.ResourceServiceHandler)3 SubsystemResourceDefinition (org.jboss.as.clustering.controller.SubsystemResourceDefinition)3 ModelVersion (org.jboss.as.controller.ModelVersion)3 PathElement (org.jboss.as.controller.PathElement)3 SimpleResourceDefinition (org.jboss.as.controller.SimpleResourceDefinition)3 ModelDescriptionConstants (org.jboss.as.controller.descriptions.ModelDescriptionConstants)3 ResourceTransformationDescriptionBuilder (org.jboss.as.controller.transform.description.ResourceTransformationDescriptionBuilder)3 TransformationDescription (org.jboss.as.controller.transform.description.TransformationDescription)3 TransformationDescriptionBuilder (org.jboss.as.controller.transform.description.TransformationDescriptionBuilder)3 EnumMap (java.util.EnumMap)2 EnumSet (java.util.EnumSet)2 Map (java.util.Map)2 CapabilityReference (org.jboss.as.clustering.controller.CapabilityReference)2 DeploymentChainContributingResourceRegistration (org.jboss.as.clustering.controller.DeploymentChainContributingResourceRegistration)2 CapabilityReferenceRecorder (org.jboss.as.controller.CapabilityReferenceRecorder)2 ResourceDefinition (org.jboss.as.controller.ResourceDefinition)2