users@glassfish.java.net

Re: Weird Message Driven Bean Behavior

From: Nigel Deakin <nigel.deakin_at_oracle.com>
Date: Fri, 16 Dec 2011 11:22:19 +0000

> On the other side we have a JEE app (in the same glassfish server) which has
> a MDB to get the message and process it... All was fine but then a week ago
> we started seeing some weird issue where the MessageProducer is putting a
> message in the queue and it takes up to 4 seconds for the MDB to grab it.

Remember you've got a pool of MDB instances running in your GlassFish server. If they're all busy processing messages
then when a new message arrives it can't be processed until a MDB instance becomes available. Do you see this problem
when the load is very low and there are lots of free MDB instances?

When you see the problem, does it continue for ever or does it go away after a while?

> One other thing, the MDB is not in a regular EJB jar, it is in a hybrid osgi
> bundle.

That's probably not the cause of the issue.

> We are trying to recreate the problem in our performance test envrionment but
> we cannot recreate it. Has anyone seen this or have any clue if we need to
> fix some parameter to prevent this from happening?

A standard piece of advice is to check both the GlassFish server log and the JMS broker log for unusual entries (Say if
you don't know how to find the latter).

Nigel