1

I want to use the module tag in the resource-adapter subsystem (instead of the archive one) to ease deployment tasks and to have only meaningful deployments so the ops can't mess with it.

The resource-adapter config with the archive tag works fine (name matches the one of its deployment) so the rest of the standalone-full-ha.xml is fine. See below for the resource-adapter subsystem config.

What I tried:

Try 1:

I created my own version of artemis ra module since we use artemis 2.6.0 as the broker version inspired (and adapted) from the provided one and placed the module files in $wildfly_home/modules. See below for module.xml

I replaced the archive tag by module tag with correct module name (org.apache.activemq.artemis.ra) and slot (2.6.0) with no luck.

The following error apears in the logs at startup:

[org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 69) WFLYCTL0013: Operation ("add") failed - address: ([
    ("subsystem" => "resource-adapters"),
    ("resource-adapter" => "remote-artemis-ra")
]) - failure description: "WFLYJCA0073: Failed to load module for RA [org.apache.activemq.artemis.ra]"

But I don't find this very helpful.

Try 2:

Same as above but using the provided ra module (just removed the slot attribute actually). It gives the same result.

Debugging in org.jboss.as.connector.subsystems.resourceadapters.RaOperationUtil#installRaServicesAndDeployFromModule shows it tries to load META-INF/ra.xml file and fails if it does not find it.

I don't understand how this can work even with the provided artemis-ra module (1.5.5 in wildfly 13) because it does not have this file. Is it somehow replaced by the resource-adapter subsystem config?

Upgrading to newer version of wildfly is not an option at the moment. Maybe in the coming months. Same for artemis exept in case this is due to a bug that got fixed.

Any help much appreciated!

module.xml for my custom artemis module (2.6.0)

<module name="org.apache.activemq.artemis.ra" slot="2.6.0" xmlns="urn:jboss:module:1.5">
    <properties>
        <property name="jboss.api" value="private"/>
    </properties>

    <resources>
        <resource-root path="META-INF"/>
        <resource-root path="artemis-ra-2.6.0.jar"/>
    </resources>

    <dependencies>
        <module name="io.netty" slot="4.1.24"/>
        <module name="javax.api"/>
        <module name="javax.jms.api"/>
        <module name="javax.resource.api"/>
        <module name="org.apache.activemq.artemis" slot="2.6.0"/>
        <module name="org.jboss.as.transactions"/>
        <module name="org.jboss.jboss-transaction-spi"/>
        <module name="org.jboss.jts"/>
        <module name="org.jboss.logging"/>
        <!-- allow to create a RA that connects to a remote Artemis server -->
        <module name="org.wildfly.naming-client" optional="true"/>
        <module name="org.jgroups" slot="3.6.13"/>
        <module name="org.wildfly.extension.messaging-activemq" services="import"/>
    </dependencies>

    <export>
        <inclue path="META-INF/ra.xml" />
    </export>
</module>

Also tried without META-INF, no luck either. Also tried with root-resource as . to include the artemis-ra-2.6.0.jar and the meta-inf folder, same error at startup.

Dependencies are created accordingly and seems to be loaded successfuly (the only error at startup is the one related to artemis-ra).

resource-adapter subsystem

<subsystem xmlns="urn:jboss:domain:resource-adapters:5.0">
    <resource-adapters>
        <resource-adapter id="remote-artemis-ra">
            <module slot="2.6.0" id="org.apache.activemq.artemis.ra"/>
            <transaction-support>XATransaction</transaction-support>
            <config-property name="ConfirmationWindowSize">
                50
            </config-property>
            <config-property name="DiscoveryRefreshTimeout">
                3333
            </config-property>
            <config-property name="password">
                admin
            </config-property>
            <config-property name="ClientFailureCheckPeriod">
                100
            </config-property>
            <config-property name="MaxRetryInterval">
                3000
            </config-property>
            <config-property name="ConnectionParameters">
                host=localhost;port=61616
            </config-property>
            <config-property name="HA">
                true
            </config-property>
            <config-property name="RetryInterval">
                4444
            </config-property>
            <config-property name="connectorClassName">
                org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory
            </config-property>
            <config-property name="ConnectionLoadBalancingPolicyClassName">
                org.apache.activemq.artemis.api.core.client.loadbalance.RoundRobinConnectionLoadBalancingPolicy
            </config-property>
            <config-property name="userName">
                admin
            </config-property>
            <config-property name="ReconnectAttempts">
                10
            </config-property>
            <connection-definitions>
                <connection-definition class-name="org.apache.activemq.artemis.ra.ActiveMQRAManagedConnectionFactory" jndi-name="java:/RAConnectionFactory" enabled="true" pool-name="RAConnectionFactory">
                    <xa-pool>
                        <min-pool-size>25</min-pool-size>
                        <max-pool-size>30</max-pool-size>
                        <prefill>true</prefill>
                        <is-same-rm-override>false</is-same-rm-override>
                    </xa-pool>
                </connection-definition>
            </connection-definitions>
        </resource-adapter>
    </resource-adapters>
</subsystem>
will
  • 61
  • 1
  • 12
  • What's your use-case here? Do you have MDBs or other clients in Wildfly which you want to integrate with a standalone ActiveMQ Artemis 2.6.0 instance? If so, have you tried using the existing RA? I would expect it to work as the broker should be compatible with older clients. – Justin Bertram Nov 19 '19 at 14:47
  • hi @JustinBertram We have MDBs indeed as well as other EARs in other wildfly instances in other servers (MDBs and non MDBs) and other clients. We need to use standalone artemis. artemis-rar-2.6.0.rar (if that's what you're mentioning) works when used as a deployment that needs to reference in the archive tag in the resource-adapter subsystem but to prevent potential mess from the ops team we need to use the module flavor of the ra. – will Nov 19 '19 at 15:11
  • I'm not referring to the Artemis 2.6.0 rar which you're deploying (either via a deployment or module). I'm talking about the RA which is built into the Wildfly messaging subsystem via the pooled-connection-factory. Have you tried using that for your integration? – Justin Bertram Nov 19 '19 at 15:33

0 Answers0