-
1. Re: Session bean pooling
jaikiran Aug 3, 2011 12:38 PM (in response to stianst)1 of 1 people found this helpfulStian Thorgersen wrote:
First question: Am I right in understanding that ThreadLocalPool used to be the default pool in AS6, and that has changed to StrictMaxPool in AS7?
Yes, that's correct.
Stian Thorgersen wrote:
Second question: How can I change (or configure) the global pool for session beans? I would like to be able to test whether or not my application works in AS7 with ThreadLocalPool (or alternatively with a higher max size for the StrictMaxPool) without having to add annotations to every single bean.
We currently are working on making that available soon in one of the upcoming releases.
-
2. Re: Session bean pooling
stianst Aug 3, 2011 2:01 PM (in response to jaikiran)Just out of curiosity, do you know why it was changed to StrictMaxPool?
-
3. Re: Session bean pooling
stianst Aug 4, 2011 7:23 AM (in response to jaikiran)I've tried to configure the pool to use ThreadLocalPool with the @Pool annotation, but it doesn't seem to work.
@org.jboss.ejb3.annotation.Pool(value="org.jboss.ejb3.pool.ThreadLocalPool") public class ...
in fact even with a bogus value ("NoSuchPool") there are no warnings or errors!
Is it at all possible to change the session bean pooling to ThreadLocalPool, or alternatively configure the maximum size of the StrictMaxPool? Without this I simply can't use AS7 as my application keeps locking up and eventually throws "Failed to obtain permitt" exceptions.
-
4. Re: Session bean pooling
jaikiran Aug 4, 2011 8:47 AM (in response to stianst)Like I said, the pooling isn't configurable for now. I'm currently working on that and will be available in the upcoming releases (either 7.0.1 or later).
-
5. Re: Session bean pooling
jaikiran Aug 4, 2011 8:51 AM (in response to stianst)1 of 1 people found this helpfulStian Thorgersen wrote:
Just out of curiosity, do you know why it was changed to StrictMaxPool?
We have had some problems in the past with ThreadLocalPool http://community.jboss.org/thread/110175?tstart=0
-
6. Re: Session bean pooling
stianst Aug 4, 2011 9:40 AM (in response to jaikiran)I misunderstood you, I thought it was only the global configuration that didn't work and it would work with annotations.
I've got things working now by patching the EJB module. I've basically replaced "org.jboss.ejb3.pool.strictmax.StrictMaxPool" with "org/jboss/ejb3/pool/threadlocal/ThreadLocalPool". With this patch in place my stress tests pass fine on AS7, so I've got a temporary solution until its possible to configure the pool.
Thanks for your help as it's saved me a lot of time trying to hunt for how to configure this. Maybe it would be worth putting a note in the migration guide from AS5/AS6 to AS7 to mention that the default pool has changed, as I could see this causing problems for other users as well.
-
7. Re: Session bean pooling
jaikiran Aug 10, 2011 5:54 AM (in response to stianst)Stian, you should now be able to configure pooling configuration at the subsystem level. See this thread for more details http://community.jboss.org/thread/170725