Back with Jboss-6.0.0.Final we had the following data-source/pool definition :

The definition for security-domain postgresqluser was:

So this gave us one pool per user with max size 5 (5 is the most that app requires + 1). If one user abused the system, and try to get more than 5 connections (e.g by pressing F5 quickly) the rest of users were unaffected since all he/she could do was to block waiting for more connections.

Now we migrated the above configuration to wildfly-10.1.0.Final as follows :

The behavior we have witnessed is different, it seems that wildfly gives the first user his 5 connections, who is able to work as long as no other user logs into the system. When the second users logs in, it seems to give to him his 5 connections (by looking into postgresql activity and logs) but it doesn't seem to be able to do any work with all 10 connections at the same time, then the second user gets blocked or some connection attempts of the first user get blocked as well. By specifying max-pool-size=10 in wildfly seems to be able to handle the first two users successfully. I know (by looking at the logs) the default pool in wildfly uses strategy : org.jboss.jca.core.connectionmanager.pool.strategy.PoolBySubjectAndCri . So I guess now in wildfly subpools' semantics have been changed to meaning partitioning of the same single pool, instead of multiple pool instances as used to be the case in jboss-6.0.0.Final.

Is my understanding correct? And if yes, which means max-pool-size applies to the whole pool, then is there a way to limit connections per user? (I know we could limit the users at the database layer, but we would like to be able to replicate the old behavior, before we move on to new changes).