use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class JaxrsExtension method initialize.
/**
* {@inheritDoc}
*/
@Override
public void initialize(final ExtensionContext context) {
JAXRS_LOGGER.debug("Activating JAX-RS Extension");
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(JaxrsSubsystemDefinition.INSTANCE);
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
ManagementResourceRegistration jaxrsResReg = subsystem.registerDeploymentModel(JaxrsDeploymentDefinition.INSTANCE);
jaxrsResReg.registerSubModel(DeploymentRestResourcesDefintion.INSTANCE);
subsystem.registerXMLElementWriter(parser);
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class NamingExtension method initialize.
/**
* {@inheritDoc}
*/
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
final ManagementResourceRegistration registration = subsystem.registerSubsystemModel(new NamingSubsystemRootResourceDefinition());
registration.registerOperationHandler(GenericSubsystemDescribeHandler.DEFINITION, GenericSubsystemDescribeHandler.INSTANCE);
registration.registerSubModel(NamingBindingResourceDefinition.INSTANCE);
registration.registerSubModel(RemoteNamingResourceDefinition.INSTANCE);
if (context.isRuntimeOnlyRegistrationValid()) {
registration.registerOperationHandler(NamingSubsystemRootResourceDefinition.JNDI_VIEW, JndiViewOperation.INSTANCE, false);
}
subsystem.registerXMLElementWriter(NamingSubsystemXMLPersister.INSTANCE);
if (context.isRegisterTransformers()) {
registerTransformers(subsystem);
}
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class JSFExtension method initialize.
/** {@inheritDoc} */
@Override
public void initialize(final ExtensionContext context) {
JSFLogger.ROOT_LOGGER.debug("Activating JSF(Mojarra) Extension");
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
subsystem.registerSubsystemModel(JSFResourceDefinition.INSTANCE);
subsystem.registerXMLElementWriter(JSFSubsystemParser_1_0.INSTANCE);
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class ConfigAdminExtension method initializeLegacyModel.
@Override
public Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, MANAGEMENT_API_VERSION);
ManagementResourceRegistration subsystemRoot = subsystem.registerSubsystemModel(new ConfigAdminRootResource());
//no need to register transformers as whole extension was deprecated in EAP 6.1 and hasn't changed since, so 1.1.0 in 6.2+ is same as current
subsystem.registerXMLElementWriter(ConfigAdminParser.INSTANCE);
return Collections.singleton(subsystemRoot);
}
use of org.jboss.as.controller.SubsystemRegistration in project wildfly by wildfly.
the class MessagingExtension method initializeLegacyModel.
@Override
protected Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(SUBSYSTEM_NAME, CURRENT_MODEL_VERSION);
subsystem.registerXMLElementWriter(MessagingXMLWriter.INSTANCE);
// Root resource
final ManagementResourceRegistration rootRegistration = subsystem.registerSubsystemModel(MessagingSubsystemRootResourceDefinition.INSTANCE);
// HQ servers
final ManagementResourceRegistration serverRegistration = rootRegistration.registerSubModel(HornetQServerResourceDefinition.INSTANCE);
// Address settings
serverRegistration.registerSubModel(AddressSettingDefinition.INSTANCE);
// Broadcast groups
serverRegistration.registerSubModel(BroadcastGroupDefinition.INSTANCE);
// Discovery groups
serverRegistration.registerSubModel(DiscoveryGroupDefinition.INSTANCE);
// Diverts
serverRegistration.registerSubModel(DivertDefinition.INSTANCE);
// Core queues
serverRegistration.registerSubModel(QueueDefinition.INSTANCE);
// Acceptors
serverRegistration.registerSubModel(HTTPAcceptorDefinition.INSTANCE);
serverRegistration.registerSubModel(GenericTransportDefinition.ACCEPTOR_INSTANCE);
serverRegistration.registerSubModel(RemoteTransportDefinition.ACCEPTOR_INSTANCE);
serverRegistration.registerSubModel(InVMTransportDefinition.ACCEPTOR_INSTANCE);
// Connectors
serverRegistration.registerSubModel(HTTPConnectorDefinition.INSTANCE);
serverRegistration.registerSubModel(GenericTransportDefinition.CONNECTOR_INSTANCE);
serverRegistration.registerSubModel(RemoteTransportDefinition.CONNECTOR_INSTANCE);
serverRegistration.registerSubModel(InVMTransportDefinition.CONNECTOR_INSTANCE);
// Bridges
serverRegistration.registerSubModel(BridgeDefinition.INSTANCE);
// Cluster connections
serverRegistration.registerSubModel(ClusterConnectionDefinition.INSTANCE);
// Grouping Handler
serverRegistration.registerSubModel(GroupingHandlerDefinition.INSTANCE);
// Connector services
serverRegistration.registerSubModel(ConnectorServiceDefinition.INSTANCE);
//todo, shouldn't we leverage Path service from AS? see: package org.jboss.as.controller.services.path
for (final String path : PathDefinition.PATHS.keySet()) {
ManagementResourceRegistration binding = serverRegistration.registerSubModel(new PathDefinition(pathElement(ModelDescriptionConstants.PATH, path)));
// Create the path resolver operation
if (context.getProcessType().isServer()) {
final ResolvePathHandler resolvePathHandler = ResolvePathHandler.Builder.of(context.getPathManager()).setPathAttribute(PathDefinition.PATHS.get(path)).setRelativeToAttribute(PathDefinition.RELATIVE_TO).build();
binding.registerOperationHandler(resolvePathHandler.getOperationDefinition(), resolvePathHandler);
}
}
// Connection factories
serverRegistration.registerSubModel(ConnectionFactoryDefinition.INSTANCE);
// Resource Adapter Pooled connection factories
serverRegistration.registerSubModel(PooledConnectionFactoryDefinition.INSTANCE);
// JMS Queues
serverRegistration.registerSubModel(JMSQueueDefinition.INSTANCE);
// JMS Topics
serverRegistration.registerSubModel(JMSTopicDefinition.INSTANCE);
serverRegistration.registerSubModel(SecuritySettingDefinition.INSTANCE);
// JMS Bridges
rootRegistration.registerSubModel(JMSBridgeDefinition.INSTANCE);
if (context.isRegisterTransformers()) {
MessagingTransformers.registerTransformers(subsystem);
}
return Collections.singleton(rootRegistration);
}
Aggregations