Reset/Flush JDBC connections pool
- February 2, 2016
- 3 replies
- 6581 views
Hi, is there a way to reset/flush the JDBC connections pool programmatically? I've configured a connection to a MySQL database via the Apache Felix Web Console and it seems like I can accomplish this by clicking on the "Reset" button in the JDBC Connections Pool dialog. However, is there a way to do this using the DataSourcePool object (which I have access to in an AEM component via sling.getService(DataSourcePool.class).
The reason why I want to do this is because the connection appears to be getting dropped intermittently with the following error message:
SQL state is 08S01, message is Communication link failure: java.net.SocketException, underlying cause: Connection reset
I've tried playing around with the pool size but it hasn't resolved the issue. Any help would be much appreciated. Thanks.
