users@glassfish.java.net

Limit MDB pool size to 1

From: <forums_at_java.net>
Date: Sun, 3 Apr 2011 18:28:37 -0500 (CDT)

I need to do sequencial processing of JMS messages in my MDB. I was thinking
of achieving this using redelivery of messages. Unfortunately messages are
being redelivered without any delay and they keep getting pushed back to the
queue until the retry count is reached. I understand that there is no way to
specify a redelivery delay in GlassFish Message Queue 4.5.

The alternate (less prefered) approach I am thinking of is to limit the MDB's
pool size to 1. What is the easiest way to do this without affecting the pool
sizes of other beans? I am using Java EE 6 annotations and was wondering if
this is possible using an ActivationConfigProperty. My MDB is defined as
follows:

@MessageDriven(mappedName="jms/MyQueue") public class MyQueueListener
implements MessageListener { }
Alternatively, if I have to write a deployment descriptor, what would be its
details (filename, content and location in my WAR)?

Thanks.


--
[Message sent by forum member 'nbhatia']
View Post: http://forums.java.net/node/788267