MDB deployment on WildFly for IBM MQ fails on connection error

785 views Asked by At

We are using WildFly (9.0.2) and a Java EE application in EAR deployment with MDBs connecting via an IBM MQ (9.0.0) resource adapter.

Now we experience that when connection to MQ server is not possible during deployment, the deployment fails:

java.lang.RuntimeException: 
com.ibm.mq.connector.DetailedResourceAdapterInternalException: 
MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011 
An internal error caused an attempt to allocate a connection to fail. 

This behaviour is bad, since the application must be available independently of this messaging interface and should continue other deployments and later try to reconnect to the server.

In a parallel project, we did the same setup against an SonicMQ server, which behaved in such a way.

How can I configure IBM MQ RA to accept disconnection at deploy time and retry during application run time?

1

There are 1 answers

2
LuckyPuck On BEST ANSWER

I had the same issue. Solved it by setting the property startupRetryCount to 1 (default is 0) in the standalone-full.xml:

    <subsystem xmlns="urn:jboss:domain:resource-adapters:3.0">
        <resource-adapters>
            <resource-adapter id="wmq.jmsra.rar">
                <archive>
                    wmq.jmsra.rar
                </archive>
                <config-property name="startupRetryCount">
                    1
                </config-property>

After setting this property I got the following info message in the WildFly log

[org.jboss.as.connector.deployers.RaXmlDeployer] (JMSCCThreadPoolWorker-5) wmq.jmsra.rar: MQJCA4014:Failed to reconnect one or more MDBs after a connection failure.

and the MDBs deployed.

Hope this solves it for you too!