use of org.jboss.as.controller.SubsystemRegistration 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);
}
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class JSR77ManagementExtension 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(new JSR77ManagementRootResource(context.getProcessType() == ProcessType.APPLICATION_CLIENT));
// Mandatory describe operation
rootResource.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
subsystem.registerXMLElementWriter(parser);
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class CmpExtension method initializeLegacyModel.
@Override
protected Set<ManagementResourceRegistration> initializeLegacyModel(final ExtensionContext context) {
final SubsystemRegistration subsystemRegistration = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
subsystemRegistration.registerXMLElementWriter(CmpSubsystem11Parser.INSTANCE);
final ManagementResourceRegistration subsystem = subsystemRegistration.registerSubsystemModel(CMPSubsystemRootResourceDefinition.INSTANCE);
subsystem.registerSubModel(UUIDKeyGeneratorResourceDefinition.INSTANCE);
subsystem.registerSubModel(HiLoKeyGeneratorResourceDefinition.INSTANCE);
if (context.isRegisterTransformers()) {
registerTransformers(subsystemRegistration);
}
return Collections.singleton(subsystem);
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class MailExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration subsystemRegistration = subsystem.registerSubsystemModel(MailSubsystemResource.INSTANCE);
subsystemRegistration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
if (context.isRegisterTransformers()) {
registerTransformers(subsystem);
}
subsystem.registerXMLElementWriter(MailSubsystemParser2_1.INSTANCE);
}
use of org.jboss.as.controller.SubsystemRegistration 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);
}
}
Aggregations