Skip to main content

How do I configure the max pool size of a MDB?

5 replies [Last post]
diogo_capistrano
Offline
Joined: 2010-07-01

How do I configure the max pool size of a MDB?

For example.:
-MDB1.class -> max of 5 beans in pool
-MDB2.class -> max of 10 beans in pool

I need to configure limit of MDB in pool.
I use Glassfish V3 and JVM6.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cf126330
Offline
Joined: 2005-03-29

Have you tried "asadmin set ... "?

$ asadmin get 'configs.config.cluster1-config.mdb-container.*'

configs.config.cluster1-config.mdb-container.idle-timeout-in-seconds=600
configs.config.cluster1-config.mdb-container.max-pool-size=32
configs.config.cluster1-config.mdb-container.pool-resize-quantity=8
configs.config.cluster1-config.mdb-container.steady-pool-size=0

The above get command shows the current setttings for mdb-container. You can use "asadmin set" to modify them.

diogo_capistrano
Offline
Joined: 2010-07-01

I believe this configuration is for all MDBs in the EJB Container. What if I had 2 MDBs but I wanted one of them to have less or more priority of the pool. I mean, of a pool of 50 beans available, one MDB would use 10 and the other 40.

cf126330
Offline
Joined: 2005-03-29

http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_1-0.dtd

You can set it for individual mdb in sun-ejb-jar.xml






x
.....


diogo_capistrano
Offline
Joined: 2010-07-01

ok it did work using that sun-ejb-jar.xml, thanks. Now lets say I deployed my application and I forgot what was the max pool size of that MDB. Is there any way to find out?

cf126330
Offline
Joined: 2005-03-29

You can try viewing it in admin console under Applications | yourApp, then choose descriptor. Not sure if sun-ejb-jar.xml data is available there.

I usually look at internal files in domain1/applications/yourApp, or domain1/generated/yourApp