Standardjboss.xml in the conf dir
If you have a look at the application server guide it describes the configuration of the various pools.
You can configure a pool in the jboss.xml deployment descriptor so your changes are specific to a single bean definition.
The maximum pool size just specifies the maximum number of beans to pool, if demand is greater more beans will be created but they will be discarded when the request finishes. If you need to make sure that no more than a certain number are in use at any one time you need to switch on strict maximum.
How do I switch to strict maximum?
I searched for this in the JBoss manual, but didn't find anything :(
I put this in standardjboss.xml's Standard Message Driven Bean <container-configuration> node...
But that is not working...my MDB is happily accepting 4 simultaneous requests and 4 instances are getting created...(I printed thread ID and object ID in onMessage() method, which prints 4 different values)
I even set this in standardjboss.xml's <invoker-proxy-binding> node...
But doesn't work :(
Aha?finally it worked?!!!
I tried it yesterday with same setting, but not sure what mistake I was doing.
We need to configure MaximumSize in <JBOSS_HOME>\server\default\conf\standardjboss.xml to limit number of threads of MDB.
<!-- WARN: Don't set this to zero until a bug in the pooled executor is fixed -->