1 Reply Latest reply on May 29, 2018 4:54 AM by Achilleas Mantzios

    Per user connection pool in wildfly 10

    Achilleas Mantzios Newbie


      We got a major migration planing from Jboss-6.0.0-Final to wildfly 10, and everything is going smooth. Except one (semi-)major show stopper having to do with connection pools.

      Back in jboss-6.0.0 we had set up individual connection pools per person, (it was done by specifying security-domain), we had set up max-pool size=5 so every user got a private pool of 5 connections. If he/she would like to abuse those 5 connections, rest of the system was unaffected, rest of users run OK.

      In widlfly 10, by specifying an equivalent security-domain and also by setting max-pool-size=5 , we can't get individual pools per user working in the same fashion as with jboss 6.0.0, we tried with all 3 pool implementations available, tweaking every parameter via the UI or the CLI and going over the docs many times, but no luck, what we see is this :

      the system gives the first 5 connections to the first user who runs his programs with no problems. Then the second user comes in and wildlfy , (judging by the postgresql activity) does seem to give 5 new connections to the second user so now (again by looking at postgresql activity) we got totally 10 connections to the system, but widlfly seems to execute only 5 connections max at a time. The rest seem blocked. What's worse, the system does not seem to handle those 5 connections very well, as soon as the second user kicks in, we got excessive delays (most probably to the combination of the default timeouts). So it seems that the 5 value (in max connections) in widlfy is about the total number of connections it can handle at a time regardless of "subject" or app, so from my understanding it seems that this max-pool-size=5 setting refers to the one single pool for this datasource.

      While there are some positive and useful aspects with this (in Jboss 6 we struggled to have one pool with different users, it was not possible to do), we still would wish to replicate the old behavior of one pool per user. I took a look at Ironjacamar code, but could not find some way we could configure for individual pools.

      Is this possible?

      Thank you