use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.
the class MessagingExtension method initialize.
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
subsystemRegistration.registerXMLElementWriter(MessagingSubsystemParser_1_1.INSTANCE);
boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid();
// Root resource
final ManagementResourceRegistration subsystem = subsystemRegistration.registerSubsystemModel(MessagingSubsystemRootResourceDefinition.INSTANCE);
subsystem.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
// ActiveMQ Servers
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);
}
if (context.isRegisterTransformers()) {
MessagingSubsystemRootResourceDefinition.registerTransformers(subsystemRegistration);
}
}
use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.
the class SecurityExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
final boolean registerRuntimeOnly = context.isRuntimeOnlyRegistrationValid();
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(SecuritySubsystemRootResourceDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
final ManagementResourceRegistration securityDomain = registration.registerSubModel(new SecurityDomainResourceDefinition(registerRuntimeOnly));
securityDomain.registerSubModel(JASPIAuthenticationResourceDefinition.INSTANCE);
securityDomain.registerSubModel(ClassicAuthenticationResourceDefinition.INSTANCE);
securityDomain.registerSubModel(AuthorizationResourceDefinition.INSTANCE);
securityDomain.registerSubModel(MappingResourceDefinition.INSTANCE);
securityDomain.registerSubModel(ACLResourceDefinition.INSTANCE);
securityDomain.registerSubModel(AuditResourceDefinition.INSTANCE);
securityDomain.registerSubModel(IdentityTrustResourceDefinition.INSTANCE);
securityDomain.registerSubModel(JSSEResourceDefinition.INSTANCE);
registration.registerSubModel(VaultResourceDefinition.INSTANCE);
// register the elytron integration resources.
registration.registerSubModel(ElytronIntegrationResourceDefinitions.getElytronRealmResourceDefinition());
registration.registerSubModel(ElytronIntegrationResourceDefinitions.getElytronKeyStoreResourceDefinition());
registration.registerSubModel(ElytronIntegrationResourceDefinitions.getElytronTrustStoreResourceDefinition());
registration.registerSubModel(ElytronIntegrationResourceDefinitions.getElytronKeyManagersResourceDefinition());
registration.registerSubModel(ElytronIntegrationResourceDefinitions.getElytronTrustManagersResourceDefinition());
// register the subsystem XML persister.
subsystem.registerXMLElementWriter(SecuritySubsystemPersister.INSTANCE);
if (context.isRegisterTransformers()) {
registerTransformers(subsystem);
}
}
use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.
the class RTSSubsystemExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(RTSSubsystemDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
subsystem.registerXMLElementWriter(parser);
}
use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.
the class SarExtension method initialize.
/** {@inheritDoc} */
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(RESOURCE_DEFINITION);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
subsystem.registerXMLElementWriter(parser);
}
use of org.jboss.as.controller.registry.ManagementResourceRegistration in project wildfly by wildfly.
the class JPAExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration nodeRegistration = registration.registerSubsystemModel(JPADefinition.INSTANCE);
nodeRegistration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
registration.registerXMLElementWriter(parser1_1);
try {
PersistenceProviderLoader.loadDefaultProvider();
} catch (ModuleLoadException e) {
ROOT_LOGGER.errorPreloadingDefaultProvider(e);
}
if (context.isRuntimeOnlyRegistrationValid()) {
registration.registerDeploymentModel(JPADefinition.INSTANCE);
}
}
Aggregations