1 2 Previous Next 22 Replies Latest reply on Apr 15, 2010 5:37 AM by ataylor

    Does the HornetQ RA work ok with non transacted

    timfox

      It's legal for an MDB, for example, to declare itself is non transacted, and to specify an acknowledge mode - either auto ack or dups ok.

       

      This needs to be passed through to the resource adaptor so the message consumption is performed in a non transacted way using the correct ack mode.

       

      Can someone verify that is the case?

       

      Also... what does the param "useXA" do on our RA? It doesn't seem to be used anywhere.

       

      Also what is the param "UseLocalTx" for on our RA? The getters are also inconsistently named - some places accessed via getUseLocalTx, and other places via isUseLocalTx.

        • 1. Re: Does the HornetQ RA work ok with non transacted
          wolfc

          I'm seeing regression on BMT MDB beans, which seems to be very close to your question.

          5.4.15 Message Acknowledgment for JMS Message-Driven Beans

          JMS message-driven beans should not attempt to use the JMS API for message acknowledgment. Mes-
          sage acknowledgment is automatically handled by the container. If the message-driven bean uses con-
          tainer-managed transaction demarcation, message acknowledgment is handled automatically as a part of
          the transaction commit. If bean-managed transaction demarcation is used, the message receipt cannot be
          part of the bean-managed transaction, and, in this case, the receipt is acknowledged by the container. If
          bean-managed transaction demarcation is used, the Bean Provider can indicate whether JMS
          AUTO_ACKNOWLEDGE semantics or DUPS_OK_ACKNOWLEDGE semantics should apply by using the

          activationConfig element of the MessageDriven annotation or by using the activa-
          tion-config-property deployment descriptor element. The property name used to specify the
          acknowledgment mode is acknowledgeMode. If the acknowledgeMode property is not specified,
          JMS AUTO_ACKNOWLEDGE semantics are assumed. The value of the acknowledgeMode property
          must be either Auto-acknowledge or Dups-ok-acknowledge for a JMS message-driven bean.

          • 2. Re: Does the HornetQ RA work ok with non transacted
            ataylor

            Carlo,

             

            point me at a failing test and i will check this now.

            • 3. Re: Does the HornetQ RA work ok with non transacted
              wolfc

              In the EJB 3 testsuite the mdb test.

              (with a running AS)

              ejb3/testsuite $ mvn package && ant -f build-test.xml -Dtest=mdb mdb test
              

               

              • testCMTTxNotSupported
              • testRuntimeException is a BMT MDB
              • testTransactionTimeout is a test for transactionTimeout activation config property (probably not supported by HQ)
              • 4. Re: Does the HornetQ RA work ok with non transacted
                ataylor

                cheers, looking at it now

                • 5. Re: Does the HornetQ RA work ok with non transacted
                  ataylor

                  Carlo de Wolf wrote:

                   

                  In the EJB 3 testsuite the mdb test.

                  (with a running AS)

                  ejb3/testsuite $ mvn package && ant -f build-test.xml -Dtest=mdb mdb test
                  

                   

                  • testCMTTxNotSupported
                  • testRuntimeException is a BMT MDB
                  • testTransactionTimeout is a test for transactionTimeout activation config property (probably not supported by HQ)

                  ok, i cant find the ejb3 testsuite?

                  • 6. Re: Does the HornetQ RA work ok with non transacted
                    wolfc

                    Here you go:

                    $ svn co https://svn.jboss.org/repos/jbossas/projects/ejb3/trunk/testsuite
                    
                    • 7. Re: Does the HornetQ RA work ok with non transacted
                      ataylor

                      Ok, i checked this and we do use the correct ack mode. The issue, for th etest i looked at, is caused becasue we acknowledge the message before call the endpoint, meaning if the MDB throws an exception the message is not redelivered.

                       

                      I am struggling with the AS build at the moment, but will test this. depending on what clebert and jeff have to do, i may build a beta 2 over the weekend to address these issues.

                      • 8. Re: Does the HornetQ RA work ok with non transacted
                        timfox

                        Ouch.

                         

                        For a transacted delivery I hope you're not calling commit before the endpoint handles the message. This is worth checking too.

                        • 9. Re: Does the HornetQ RA work ok with non transacted
                          ataylor

                          Tim Fox wrote:

                           

                          Ouch.

                           

                          For a transacted delivery I hope you're not calling commit before the endpoint handles the message. This is worth checking too.

                          No remember the container calls commit on afterDelivery() which we always call at the end.

                          • 10. Re: Does the HornetQ RA work ok with non transacted
                            clebert.suconic

                            @Andy: I was talking to Jason and Carlo today. This issue is a blocker for them, and they can't release M3 without this fix. They would rather switch to JBoss Messaging (what isn't an option at this point).

                             

                            So, if you fix the issue on trunk I can do a release cycle tomorrow and make sure we won't have test regressions on the AS testsuite. I have cleared a lot of the failures that there was on AS6. I can run the tests before cutting the release, so we won't have problems on regressions.

                            • 11. Re: Does the HornetQ RA work ok with non transacted
                              jason.greene

                              We were really just discussing what possible work arounds users could use that rely on say BMT MDBs. Another option is we could just have a patched jar after the M3 release to point people to. Or we could include a snapshot in M3.

                              • 12. Re: Does the HornetQ RA work ok with non transacted
                                jason.greene

                                If however this is going to take too much time or imposes a significant burden on you guys, we could just wait till M4. I don't consider it a true blocker, its just a big regression.

                                • 13. Re: Does the HornetQ RA work ok with non transacted
                                  timfox

                                  AIUI this is a 5 min fix. Not sure what the hold up is.

                                  • 14. Re: Does the HornetQ RA work ok with non transacted
                                    clebert.suconic

                                    It's just a matter of a release.

                                     

                                    I'm asking Andy if he fix it (AFAIK it's fixed on his workspace.. he just needs to commit it), I will handle the release and making sure we don't have regressions on AS6 integration testsuite.

                                    1 2 Previous Next