users@glassfish.java.net

Re: MDB: max-pool-size vs. steady-pool-size; new instance on every message

From: <glassfish_at_javadesktop.org>
Date: Mon, 04 Aug 2008 11:03:58 PDT

What is happening is that the pool implementation eagerly attempts to repopulate the pool whenever the current pool size goes below the specified steady-pool-size. In your case since the steady-pool-size is 1, as soon a bean is taken out of the pool to service a new request, the pool implementation (through a background thread) populates the pool with another instance.

Now when the request finishes the instance is returned back to the pool, but since you have set the max-pool-size also to 1, it destroys the instance.

Try setting the max-pool-size to greater than 1
[Message sent by forum member 'mk111283' (mk111283)]

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