Connection pool is not removed after deletion of datasource using java code.
Teiid(Jboss) server reload required to reflect the deletion of connection pool from actual database(we are using mysql as database).
Until server reloads, connections in deleted datasource's connection pool remain in sleep mode.
- Connection is created with the mysql database using teiid
- Datasource is created in teiid.
- Delete the above created connection through java using code i.e by using AdminApiClientAccessor.
- That removed the datasource from teiid.
- Through below code I am able to delete the datasource.
datasourceName = name of the datasource created earlier.
- Even though datasource removed, connection pool is not destroyed
- Able to see connection threads available on Mysql admin console using the command
- Changes reflect only when the Teiid (jboss) server is reloaded.
- Once server reloads connections in connection pool is closed/removed from the database.
- 'Too many connection' issue facing on mysql server due to multiple connection threads remains in sleep mode even though datasource are already removed.
Please let us know :
- Is there any method to remove connection pool from actual database.
- Is server reload mandatory.