Is there any way to determine database connection pool size. I want to find out min pool size, max pool size.
The reason is as follows:
- My application is running on Wildfly-9.0.1.Final.
- I have configure datasource in -ds.xml file.
- I have so many clients and for each one there is -ds.xml file.
- In each file I have specified max-pool-size = 30.
But for some clients this size(30) happens to be small as more and more user tries to get connection from pool concurrently. Then in that case I need to increase max-pool-size to higher number. I want something like that will help me to fetch these parameters and then based on that I will perform some logic. Like if pool-size have reached to 25/30 then it will trigger email as an alert so that developer can increase its pool size. This way it will be helpful to avoid problems that client do faces when he could not get connection when all are being aquired.
Is there any way to access these connection pool parameters programatically.