5 Replies Latest reply on Sep 8, 2003 2:18 AM by Houyoux Olivier

    DLQ on JBoss 3.0.x

    Houyoux Olivier Newbie

      Hi,

      Our J2EE application is currently running on JBoss 3.0.4 / JDK 1.3.1 and has some MDBs.
      We use the DLQ to keep track of erroneous messages.

      We also decided to upgrade the server to the improved 3.0.8 version, but the DLQ mechanism doesn't work anymore even if
      the invoker-proxy-binding configurations of the MDBs were not modified at all.

      So we were wondering if there is a new configuration parameter that enables / disables this behavior in versions upper than 3.0.4 ?

        • 1. Re: DLQ on JBoss 3.0.x
          Adrian Brock Master

          There is no invoker proxy binding in 3.0
          It is <container-invoker> and <container-invoker-conf>
          see standardjboss.xml in /conf

          Regards,
          Adrian

          • 2. Re: DLQ on JBoss 3.0.x
            Houyoux Olivier Newbie

            Hi Adrian,

            Thanks for your reply.

            I personnaly investigated the problem more deeply and sorry if I made a mistake in the previous message.

            In our application, we try to deal with incoming messages twice (MaxTimesRedelivered=1) before sending it in the DLQ. And this is where the problem occurs in JBoss 3.0.x.
            The incoming message is never redelivered if an exception is thrown in the onMessage() method.

            public void onMessage(Message inMessage)
            {
            try
            {
            ...
            }
            catch (Exception e)
            {
            throw new EJBException(e.getMessage());
            }
            }

            I created a simple example that demonstrates this behavior.
            The example is made of an MDB and a client that sends a message to the bean (simply start the 3.0.x server, call the default ant task followed by the run.client task).
            An exception is automatically thrown in the bean while processing the message. I supposed that this message should be redilivered 10 times (MaxTimesRedelivered=10 by default) before beeing sent to the DLQ but nothing happened.

            What should I do to ensure redelivery ?

            Kind Regards,
            Olivier.

            • 4. Re: DLQ on JBoss 3.0.x
              Adrian Brock Master

              I had problems downloading your example.
              Maybe somthing wrong with my browser mime types? It
              thought it was xml.

              But...
              You are not supposed to throw an exception from onMessage.
              You are suppoesed to setRollbackOnly() on the
              message driven context.

              Throwing a exception will work within jboss provided the
              MDB is "Required", but you shouldn't really depend on this.

              Regards,
              Adrian

              • 5. Re: DLQ on JBoss 3.0.x
                Houyoux Olivier Newbie

                That's it,

                I called setRollbackOnly() on the
                message driven context and everything worked prefectly.

                Thanks a lot.