use of org.wildfly.extension.messaging.activemq.jms.JMSQueueDefinition in project wildfly by wildfly.
the class ServerDefinition method getChildren.
@Override
protected List<? extends PersistentResourceDefinition> getChildren() {
List<PersistentResourceDefinition> children = new ArrayList();
// Static resources
children.addAll(Arrays.asList(// HA policy
LiveOnlyDefinition.INSTANCE, ReplicationMasterDefinition.INSTANCE, ReplicationSlaveDefinition.INSTANCE, ReplicationColocatedDefinition.INSTANCE, SharedStoreMasterDefinition.INSTANCE, SharedStoreSlaveDefinition.INSTANCE, SharedStoreColocatedDefinition.INSTANCE, AddressSettingDefinition.INSTANCE, SecuritySettingDefinition.INSTANCE, // Connectors
HTTPConnectorDefinition.INSTANCE, RemoteTransportDefinition.CONNECTOR_INSTANCE, InVMTransportDefinition.CONNECTOR_INSTANCE, GenericTransportDefinition.CONNECTOR_INSTANCE, // Acceptors
HTTPAcceptorDefinition.INSTANCE, RemoteTransportDefinition.ACCEPTOR_INSTANCE, InVMTransportDefinition.ACCEPTOR_INSTANCE, GenericTransportDefinition.ACCEPTOR_INSTANCE, BroadcastGroupDefinition.INSTANCE, DiscoveryGroupDefinition.INSTANCE, BridgeDefinition.INSTANCE, ClusterConnectionDefinition.INSTANCE, DivertDefinition.INSTANCE, ConnectorServiceDefinition.INSTANCE, GroupingHandlerDefinition.INSTANCE, // JMS resources
LegacyConnectionFactoryDefinition.INSTANCE, PooledConnectionFactoryDefinition.INSTANCE));
// Dynamic resources (depending on registerRuntimeOnly)
children.add(new QueueDefinition(registerRuntimeOnly, MessagingExtension.QUEUE_PATH));
children.add(new JMSQueueDefinition(false, registerRuntimeOnly));
children.add(new JMSTopicDefinition(false, registerRuntimeOnly));
children.add(new ConnectionFactoryDefinition(registerRuntimeOnly));
return children;
}
use of org.wildfly.extension.messaging.activemq.jms.JMSQueueDefinition 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