Search in sources :

Example 1 with JMSQueueDefinition

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;
}
Also used : JMSTopicDefinition(org.wildfly.extension.messaging.activemq.jms.JMSTopicDefinition) PersistentResourceDefinition(org.jboss.as.controller.PersistentResourceDefinition) JMSQueueDefinition(org.wildfly.extension.messaging.activemq.jms.JMSQueueDefinition) ArrayList(java.util.ArrayList) ConnectionFactoryDefinition(org.wildfly.extension.messaging.activemq.jms.ConnectionFactoryDefinition) PooledConnectionFactoryDefinition(org.wildfly.extension.messaging.activemq.jms.PooledConnectionFactoryDefinition) LegacyConnectionFactoryDefinition(org.wildfly.extension.messaging.activemq.jms.legacy.LegacyConnectionFactoryDefinition) JMSQueueDefinition(org.wildfly.extension.messaging.activemq.jms.JMSQueueDefinition)

Example 2 with JMSQueueDefinition

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);
    }
}
Also used : JMSTopicDefinition(org.wildfly.extension.messaging.activemq.jms.JMSTopicDefinition) SimpleResourceDefinition(org.jboss.as.controller.SimpleResourceDefinition) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) JMSQueueDefinition(org.wildfly.extension.messaging.activemq.jms.JMSQueueDefinition) SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Aggregations

JMSQueueDefinition (org.wildfly.extension.messaging.activemq.jms.JMSQueueDefinition)2 JMSTopicDefinition (org.wildfly.extension.messaging.activemq.jms.JMSTopicDefinition)2 ArrayList (java.util.ArrayList)1 PersistentResourceDefinition (org.jboss.as.controller.PersistentResourceDefinition)1 SimpleResourceDefinition (org.jboss.as.controller.SimpleResourceDefinition)1 SubsystemRegistration (org.jboss.as.controller.SubsystemRegistration)1 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)1 ConnectionFactoryDefinition (org.wildfly.extension.messaging.activemq.jms.ConnectionFactoryDefinition)1 PooledConnectionFactoryDefinition (org.wildfly.extension.messaging.activemq.jms.PooledConnectionFactoryDefinition)1 LegacyConnectionFactoryDefinition (org.wildfly.extension.messaging.activemq.jms.legacy.LegacyConnectionFactoryDefinition)1