4 Replies Latest reply on Mar 6, 2015 12:40 PM by Neeru Thota

    JMS connection factory transaction mode is xa, however the the MDB transaction type is of NOT_SUPORTED

    Neeru Thota Newbie

      While I am working on an application I have come across the below MDB code and JMS configuration on JBoss.

      Brief description of flow is that a first MDB posts a message to another MDB. The connection factory used is of type java:JmsXA and

      transaction mode="xa". The destination MDB has transaction annotations as Container managed and transaction attribute as NOT_SUPPORTED.

       

      My question is that the connection factory is configured with xa transaction mode, however the bean is marked as transaction NOT_SUPPORTED.
      Is this a valid configuration?

       

      Connection factory configuration:

        <pooled-connection-factory name="hornetq-ra-for-data-processor">
           <transaction mode="xa"/>
           <min-pool-size>1</min-pool-size>
           <max-pool-size>50</max-pool-size>
           <connectors>
            <connector-ref connector-name="in-vm"/>
           </connectors>
           <entries>
            <entry name="java:/JmsXAForDataProcessor"/>
           </entries>
           <client-failure-check-period>2147483646</client-failure-check-period>
           <connection-ttl>-1</connection-ttl>
           <call-timeout>180000</call-timeout>
           <consumer-window-size>104857600</consumer-window-size>
           <reconnect-attempts>-1</reconnect-attempts>
          </pooled-connection-factory>
      


      First MDB:

         public class PreprocessorMDB implements MessageListener {
              @Resource(mappedName = "java:/JmsXAForDataProcessor")
              ConnectionFactory connectionFactory;
      
           @Resource(mappedName = "java:/queue/queue2")
              Queue dataProcessorQueue;
      

      Second MDB:

       

         @MessageDriven(name = "ProcessorMDB", activationConfig = {
              @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
              @ActivationConfigProperty(propertyName = "destination", propertyValue = "java:/queue/queue2"),
              @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")})
          @TransactionManagement(value = TransactionManagementType.CONTAINER)
          @TransactionAttribute(value = TransactionAttributeType.NOT_SUPPORTED)
          @ResourceAdapter("hornetq-ra-for-data-processor")
          public class ProcessorMDB implements MessageListener {