users@glassfish.java.net

Setting endpointExceptionRedeliveryAttempts when using JMS and Spring

From: <glassfish_at_javadesktop.org>
Date: Sun, 28 Jun 2009 18:05:33 PDT

I'm researching how I can prevent poisonous messages using Glassfish, JMS, and Spring.

What I have found so far is that there is a property named "endpointExceptionRedeliveryAttempts" that can be set using a Message Queue JMS Resource Adapter. See http://docs.sun.com/app/docs/doc/820-6740/aeoon?a=view

However, I can't figure out how to set this property. My environment is Glassfish v2.1-b60e and Spring. I'm not using Message Driven Beans (MDBs). I'm using Spring's DefaultMessageListenerContainer and a Message Driven Pojo (MDP).

What I'm experiencing is a infinite loop when the MDP throws an exception - the message gets rolledback onto the queue and then re-delivered to the MDP which throws an exception and gets rolledback........

Could someone expain to me how to set the re-delivery attempts to prevent his situation?

Thanks in advance,
Mark
[Message sent by forum member 'dichotomy' (dichotomy)]

http://forums.java.net/jive/thread.jspa?messageID=353329