1 Reply Latest reply on Sep 13, 2007 7:51 AM by Nicolas Leroux

    Redelivering messages

    Nicolas Leroux Newbie

      I have a small problem with Redelivering messages.

      I am using jboss 4.0.5.

      I have looked at bug EJBTHREE-783 and backported the changes from 4.2.1ga to the 4.0.5 branch.

      However, when looking at the code, I came across the following part, in org.jboss.ejb.plugins.inflow.JBossMessageEndpointFactory:



      
      public boolean isDeliveryTransacted(Method method) throws NoSuchMethodException
       {
       boolean result = false;
       int transType = metaData.getMethodTransactionType(method.getName(), method.getParameterTypes(), InvocationType.LOCAL);
       if (transType == MetaData.TX_REQUIRED)
       result = true;
       if (trace)
       log.trace("isDeliveryTransacted " + container.getBeanMetaData().getContainerObjectNameJndiName() + " method=" + method + " result=" + result);
       return result;
       }
      
      


      I am a bit surprised by this method. What about TX_MANDATORY, TX_REQUIRES_NEW, and TX_SUPPORT?

      I guess that the delivery is transacted if we are using any of these states.

      Currently messages do not get rollback and requeued if the transaction type is other than REQUIRED. I don't think that's correct. They should be requeued as well for other transaction types.

      What there a logic behind this? I may I reopen EJBTHREE-783?

      Thanks,

      Nicolas Leroux

        • 1. Re: Redelivering messages
          Nicolas Leroux Newbie

          I am reading the page 110 of the spec


          If the bean is specified as using container-managed transaction demarcation, either the REQUIRED or the NOT_SUPPORTED transaction attribute must be used for the message listener methods


          So it seems that my remarks must be ignored.


          Nicolas Leroux