-
1. Re: MDB Pool size configuration
hrpatel Apr 6, 2010 5:58 PM (in response to bwarren)Hi,
I am running into the same issue. In my case, the 15 'threads' is a bottleneck that can easily be remedied if I could double or triple the pool sizes. I am able to reduce the size to 10 (or any number below 15) but I cannot increase it.
Am I missing something obvious?
This is the closest to an exaplantion I can find: http://community.jboss.org/wiki/ConfigJBossMDB?decorator=print, See 'General Pooling Notes'.
Cheers,
-H
-
2. Re: MDB Pool size configuration
bwarren Apr 6, 2010 6:06 PM (in response to hrpatel)@Pool and @ActivationConfigProperty together were the solution for us. It did not work with either one individually but if you set them both, it works.
Hope that helps you.
-
3. Re: MDB Pool size configuration
hrpatel Apr 6, 2010 6:11 PM (in response to bwarren)Thanks for the quick reply, Brad.
Thats great news for us. Which properties did you set in the ActivationConfigProperty section? I already have the @Pool set.
-
4. Re: MDB Pool size configuration
bwarren Apr 6, 2010 6:28 PM (in response to hrpatel)@MessageDriven(
activationConfig={...
@ActivationConfigProperty(propertyName="MaxPoolSize",propertyValue="50")
}
)Change "50" to whatever you want your pool size to be.
-
5. Re: MDB Pool size configuration
hrpatel Apr 6, 2010 6:58 PM (in response to bwarren)Thanks Brad!
Adding 'maxSession' did the trick for me.
@MessageDriven( activationConfig={ ... @ActivationConfigProperty(propertyName="maxSession",propertyValue="50") } )
I tried using MaxPoolSize as you suggested but i got the following error:
No property found for: MaxPoolSize on JavaBean: org.jboss.resource.adapter.jms.inflow.JmsActivationSpec
-
6. Re: MDB Pool size configuration
bwarren Apr 6, 2010 7:07 PM (in response to hrpatel)Yes maxSession is right. MaxPoolSize was a brain fart.
Glad you got it working.
-
-
8. Re: MDB Pool size configuration
devireddy Jun 22, 2010 6:39 AM (in response to hrpatel)Thanks for the post. I had the same problem and using both
@PoolClass(value = org.jboss.ejb3.StrictMaxPool.class, maxSize = 30)
and
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "30")
Helped me.
Thank you
Raj
-
9. Re: MDB Pool size configuration
pedrong Jul 6, 2010 5:54 PM (in response to devireddy)I have been suffering trying to tune my MDB's pools so I would like to share some things I found out:
1.
Change ejb3-interceptors-aop.xml its only good if you want/can change the config to all of yours ejbs.
If you have, for instance, many MDBs and want to increase the pool for just that critical one, change the ejb3-interceptors-aop.xml may not be a good choice since all others MDB's pools will be increased as well and some memory will be wasted.
Besides that, you are going to increase a bit your deployment complexity since a file outside your ear/jar needs to be managed.
2.
@Pool or @PoolClass?
It depends on your JBoss version. For <= 4.2.3 @PoolClass, otherwise, @Pool.
I tested only in 4.2.3 and 5.1.0.
3.
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = XX)
I keep the XX equal to the pool size. The maxSession property defines the "the maximum number of jms sessions that can concurrently deliver messages to this mdb", so it makes sense to me keep then equal. What do you think?
4.
Using XML (*-aop.xml)
With an ejb jar inside an ear, I could only make it work with @AspectDomain annotation.
Hope it help!
These are just my experience, if someone want to add something, please, do it!
-
10. Re: MDB Pool size configuration
letincho Nov 25, 2010 11:01 AM (in response to pedrong)Hi,
I'm using JBoss 5.1. This configuration has worked for me:
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "50")})@Pool (value=PoolDefaults.POOL_IMPLEMENTATION_STRICTMAX,maxSize=50,timeout=20000)@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "50")})
@Pool (value=PoolDefaults.POOL_IMPLEMENTATION_STRICTMAX,maxSize=50,timeout=20000)
@PoolClass is an attribute for JBoss 4. In JBoss 5 it was replaced by @Pool.
Bye,
-
11. Re: MDB Pool size configuration
konami Sep 11, 2011 7:54 AM (in response to bwarren)For JBoss 5.1, modifying following setting in deploy/jca-jbos-beans.xml works.
<bean name="WorkManagerThreadPool" class="org.jboss.util.threadpool.BasicThreadPool">
....
....
....
<property name="maximumPoolSize">xx</property>
-
12. Re: MDB Pool size configuration
jaabax Sep 30, 2011 9:56 AM (in response to bwarren)I found that:
{code}
...
@MessageDriven(
...
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "100") })
@Pool(value = PoolDefaults.POOL_IMPLEMENTATION_THREADLOCAL, maxSize = 100, timeout = 10000)
...
{code}
have the same effect as (with no @ActivationConfigProperty with maxSession property):
{code}
...
@Pool(value = PoolDefaults.POOL_IMPLEMENTATION_STRICTMAX, maxSize = 100, timeout = 10000)
...
{code}
can somebody explain us with more details the differences between both approaches?
thanks in advance
-
13. Re: MDB Pool size configuration
wolfc Sep 30, 2011 12:55 PM (in response to jaabax)maxSession determines the amount of session/consumers the resource adapter will create to forward messages into the MDB.
The pool size governs the amount of MDB instances that are available for processing this inflow.
-
14. Re: MDB Pool size configuration
jaabax Oct 5, 2011 9:40 AM (in response to wolfc)hi Carlo de Wolf
and what the difference of
PoolDefaults.POOL_IMPLEMENTATION_THREADLOCAL
anPoolDefaults.POOL_IMPLEMENTATION_STRICTMAX
what algorithm should I use and when?
thanks in advance