We’re using a Payara 5 server with 4 application instances. A JDBC pool is configured with 5 set as the maximum number of connections in the pool. A JDBC resource pointing at the JDBC connection pool is also created and the cluster is set as the target.
I would have expected that all 4 instances can only use at most 5 connections in total, however, in our database tool I can see that each instance can make 5 connections, so the total number of connections is 20. With the given setup, I thought the pool is shared between all instances, but it’s not.
The JNDI name is used in the persistence.xml as the value for the element.
Why is the pool not shared among all instances?