2 Replies Latest reply on Jul 18, 2017 9:32 AM by Miroslav Novak

    Wildfly 8.2 - WMQ Resource Adapter (wmq 6.0.2.10 & 7.0.1.3) || ARJUNA016027 XAResource closed

    MaxJboss MaxJboss Newbie

      Hi All,

       

      Ours is basically migration project from jboss-4.0.5.GA_3 to Wildfly 8.2

       

      I am getting below warning/exception instead of message for my MDB. (Sometimes when exception does not occur I get message and mdb works.)

      2017-07-11 06:23:19,479 WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_PROTO: javax.transaction.xa.XAException: XAResource closed

        at com.ibm.mq.MQXAResource.recover(MQXAResource.java:735)

        at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.recover(XAResourceWrapperImpl.java:185)

        at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoverySecondPass(XARecoveryModule.java:740) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)]

        at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:431) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)]

        at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:212) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)]

        at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)]

        at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [narayana-jts-jacorb-5.0.0.Final.jar:5.0.0.Final (revision: 9aa71)]

       

      Below are the configuration files and code.

       

      standalone.xml (not sure "Trying to deploy Websphere MQ resource adapter to WildFly 8.0.0.Beta1 " NoTransaction is the valid value for transation-support or not but I just didn't want to use XATransation as the exception is regarding XARecovery, also in previous-jboss4 configuration:jboss-service.xml also I saw "<attribute name="IsXA">false</attribute>" and we are just migrating to Wildfly without changing any other systems.)

       

      <subsystem xmlns="urn:jboss:domain:resource-adapters:2.0">
           <resource-adapters>
                <resource-adapter id="wmq.jmsra.rar">
                     <module slot="main" id="com.ibm.wmq.jmsra" />
                     <transaction-support>NoTransaction</transaction-support>
                     <connection-definitions>
                          <connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="java:/MQQueueConnectionFactory"
                          enabled="true" pool-name="MQQueueConnectionFactory">
                               <config-property name="hostName">
                                    xyzcompany.intra.com
                               </config-property>
                               <config-property name="password">
                                    *********
                               </config-property>
                               <config-property name="queueManager">
                                    SQLT0001
                               </config-property>
                               <config-property name="port">
                                    1414
                               </config-property>
                               <config-property name="channel">
                                    PROJECT.SVRCONN
                               </config-property>
                               <config-property name="transportType">
                                    CLIENT
                               </config-property>
                               <config-property name="username">
                                    username
                               </config-property>
                               <security>
                                    <application />
                               </security>
                               <validation>
                                    <background-validation>false</background-validation>
                               </validation>
                          </connection-definition>
                     </connection-definitions>
                     <admin-objects>
                          <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy"
                          jndi-name="java:/wsmq/ResponseQueue" pool-name="WSMQResponseQueue">
                               <config-property name="baseQueueName">
                                    PROJECT.REPLY.QL37
                               </config-property>
                          </admin-object>
                          <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy"
                          jndi-name="java:/wsmq/RequestQueue" pool-name="WSMQRequestQueue">
                               <config-property name="baseQueueName">
                                    PROJECT.PREPAID.REQ.QR02
                               </config-property>
                          </admin-object>
                     </admin-objects>
                </resource-adapter>
           </resource-adapters>
      </subsystem>
      
      
      <subsystem xmlns="urn:jboss:domain:ejb3:2.0">
           <session-bean>
                <stateful default-access-timeout="5000" cache-ref="simple" passivation-disabled-cache-ref="simple" />
                <singleton default-access-timeout="5000" />
           </session-bean>
           <mdb>
                <resource-adapter-ref resource-adapter-name="wmq.jmsra.rar" />
                <bean-instance-pool-ref pool-name="mdb-strict-max-pool" />
           </mdb>
           <pools>
                <bean-instance-pools>
                     <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES" />
                     <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES" />
                </bean-instance-pools>
           </pools>
           <caches>
                <cache name="simple" />
                <cache name="distributable" passivation-store-ref="infinispan" aliases="passivating clustered" />
           </caches>
           <passivation-stores>
                <passivation-store name="infinispan" cache-container="ejb" max-size="10000" />
           </passivation-stores>
           <async thread-pool-name="default" />
           <timer-service thread-pool-name="default" default-data-store="default-file-store">
                <data-stores>
                     <file-data-store name="default-file-store" path="timer-service-data" relative-to="jboss.server.data.dir" />
                </data-stores>
           </timer-service>
           <remote connector-ref="http-remoting-connector" thread-pool-name="default" />
           <thread-pools>
                <thread-pool name="default">
                     <max-threads count="10" />
                     <keepalive-time time="100" unit="milliseconds" />
                </thread-pool>
           </thread-pools>
           <default-security-domain value="other" />
           <default-missing-method-permissions-deny-access value="true" />
      </subsystem>
      

       

      ejb-jar.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
           <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version="3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
           http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
                <display-name>Wallet.EJB</display-name>
                <enterprise-beans>
                     <message-driven>
                          <display-name>MyResponseBean</display-name>
                          <ejb-name>MyResponseBean</ejb-name>
                          <ejb-class>com.project.wallet.ejb.MyResponseBean</ejb-class>
                          <transaction-type>Container</transaction-type>
                          <activation-config>
                               <activation-config-property>
                                    <activation-config-property-name>messagingType</activation-config-property-name>
                                    <activation-config-property-value>javax.jms.MessageListener</activation-config-property-value>
                               </activation-config-property>
                          <activation-config-property>
                                    <activation-config-property-name>hostName</activation-config-property-name>
                                    <activation-config-property-value>xyzcompany.intra.com</activation-config-property-value>
                          </activation-config-property>
                          <activation-config-property>
                                    <activation-config-property-name>port</activation-config-property-name>
                                    <activation-config-property-value>1414</activation-config-property-value>
                          </activation-config-property>
                          <activation-config-property>
                                    <activation-config-property-name>queueManager</activation-config-property-name>
                                    <activation-config-property-value>SQLT0001</activation-config-property-value>
                          </activation-config-property>
                          <activation-config-property>
                                    <activation-config-property-name>channel</activation-config-property-name>
                                    <activation-config-property-value>PROJECT.SVRCONN</activation-config-property-value>
                          </activation-config-property>
                          <activation-config-property>
                                    <activation-config-property-name>username</activation-config-property-name>
                                    <activation-config-property-value>username</activation-config-property-value>
                          </activation-config-property>
                          <activation-config-property>
                                    <activation-config-property-name>password</activation-config-property-name>
                                    <activation-config-property-value>*********</activation-config-property-value>
                          </activation-config-property>
                          <activation-config-property>
                                    <activation-config-property-name>destinationType</activation-config-property-name>
                                    <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
                          </activation-config-property>
                          <activation-config-property>
                                    <activation-config-property-name>destination</activation-config-property-name>
                                    <activation-config-property-value>PROJECT.REPLY.QL37</activation-config-property-value>
                          </activation-config-property>
                          <activation-config-property>
                                    <activation-config-property-name>transportType</activation-config-property-name>
                                    <activation-config-property-value>CLIENT</activation-config-property-value>
                          </activation-config-property>
                     </activation-config>
                     <resource-ref>
                          <description>MySQL DS</description>
                          <res-ref-name>MySQL DS</res-ref-name>
                          <res-type>javax.sql.DataSource</res-type>
                          <res-auth>Container</res-auth>
                          <mapped-name>java:/jdbc/MySqlDS</mapped-name>
                     </resource-ref>
                     <resource-ref>
                          <description>MySQL Finance DS</description>
                          <res-ref-name>MySQL Finance DS</res-ref-name>
                          <res-type>javax.sql.DataSource</res-type>
                          <res-auth>Container</res-auth>
                          <mapped-name>java:/jdbc/MySqlFinanceDS</mapped-name>
                     </resource-ref>
                     <security-identity>
                          <description></description>
                          <run-as>
                               <description></description>
                               <role-name></role-name>
                          </run-as>
                     </security-identity>
                </message-driven>
           </enterprise-beans>
      </ejb-jar>
      

       

       

      jboss-ejb3.xml

       

      <?xml version="1.1" encoding="UTF-8"?>
      <jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:r="urn:resource-adapter-binding" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee
      http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" version="3.1" impl-version="2.0">
                <enterprise-beans>
                     <message-driven>
                          <ejb-name>MyResponseBean</ejb-name>
                     </message-driven>
                </enterprise-beans>
                
                <assembly-descriptor>
                     <r:resource-adapter-binding>
                          <ejb-name>MyResponseBean</ejb-name>
                          <r:resource-adapter-name>wmq.jmsra.rar</r:resource-adapter-name>
                     </r:resource-adapter-binding>
                </assembly-descriptor>
      </jboss:ejb-jar>
      

       

      jboss.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
        http://www.jboss.org/j2ee/schema/jboss_5_0.xsd" version="5.0">
           <enterprise-beans>
                <message-driven>
                     <ejb-name>MyResponseBean</ejb-name>
                     <resource-adapter-name>wmq.jmsra.rar</resource-adapter-name>
                      <invoker-bindings>
                          <invoker>
                               <invoker-proxy-binding-name>message-inflow-driven-bean</invoker-proxy-binding-name>
                          </invoker>
                     </invoker-bindings>
                </message-driven>
           </enterprise-beans>
      </jboss>
      

       

      MyResponseBean.java

       

      public class MyResponseBean extends AbstractMessageDrivenBean implements javax.ejb.MessageDrivenBean, javax.jms.MessageListener {
           public void onMessage(Message message) {
                  logger.info("Response handler MDB received a message");
           }
      }
      

       

      I have also overridden other necessary methods as well and for some times I get the below log as well.

      Response handler MDB received a message

       

       

      I also tried changing resource adapter version to 7.0.1.3 from our current version 6.0.2.10, as suggested in below link but still I am getting same exception.

      https://access.redhat.com/solutions/525813

       

      Please help me through.

      Thanks,

      Malhar