1 Reply Latest reply on Apr 12, 2012 7:00 AM by ataylor

    Message behavior scenario

    sergiu_pienar

      Hi,

       

      Using JBoss 5.1.0 GA with HornetQ 2.1.2 Final.

       

      Having the following scenario :

       

      A quartz job runs every minute, each time it starts triggering a new transaction. Within this transaction, at some point I do :

       

      Message jmsMessage = mc.receiveNoWait();

       

      (using XAConnection/XASession).

       

      My question is : if the message is received, but the transaction in which it was received fails, what's the status of the message ? Will it be marked for redelivery or given that I'm not using an MDB to process the message, it is considered that once mc.receiveNoWait() has completed successfully the message it to be ACK'ed ?

       

      Thank you.

        • 1. Re: Message behavior scenario
          ataylor

          If you are using the pooled connection factories via the resource adapter, i.e. java:/jmsXA, then it will only be part of the tx if the tx is controlled by the transaction manager, i am guessing not but i don't know how you app is working, its not really a HornetQ question.

           

          If you are using a normal factory then you would have to associate the xaresource with the transaction your self