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"/>
            <connector-ref connector-name="in-vm"/>
            <entry name="java:/JmsXAForDataProcessor"/>

      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)
          public class ProcessorMDB implements MessageListener {