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,
there are four optional parameters to configure your connection pool.
min-pool-size (default: 0 = none)
idle-timeout-minutes(default:0 = infinite)
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: