-
1. Re: Help understanding ManagedConnectionPool Behaviour
dmeeuwis Mar 12, 2007 6:55 PM (in response to dmeeuwis)Responding to myself, I've been looking through the JBoss code, and it seems like the connections are managed in internal subpools. Whenever a connection is requested, JBoss tries to allocate from an existing subpool. If there are no free connections in the existings subpools, a new subpool is created, and a connection is taken from there.
If this is true, it would seem that JBoss does not have any background thread that watches the usage count and allocating when the free connections are getting low, or when it hits a certain threshold, or any similiar mechanism. It allocates new connections exactly when there are zero available connections.
Can anyone confirm that I am understanding JBoss's ManagedConnectionPool behaviour correctly?
Thanks for any help,
David M. -
2. Re: Help understanding ManagedConnectionPool Behaviour
roist Mar 13, 2007 5:16 AM (in response to dmeeuwis)there are four optional parameters to configure your connection pool.
min-pool-size (default: 0 = none)
max-pool-sie (default:20)
idle-timeout-minutes(default:0 = infinite)
blocking-timeout-millis(default=5000)
if you have high peek concurrency, you can try setting the timeout to a reasonable timing.
max-size is hardcapped - you cannot get over this value at any rate.
actually, the pool behaviour ( - which pool is chosen) depends on your xml-datasource configuration:
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossJCAPooling