OpenCDSS / cdss-lib-common-java

Colorado's Decision Support Systems (CDSS) common library (Java)
GNU General Public License v3.0
0 stars 1 forks source link

Need way for datastore database connections to pass additional properties #61

Closed smalers closed 5 years ago

smalers commented 5 years ago

Database datastore configurations are used to create a connection string for databases. This includes the server and database name, credentials, etc. There is a need to allow additional configuration properties to be set so that database-specific connection parameters can be set. The immediate need is to ensure that a PostgreSQL connection does not time out after a period of inactivity.

smalers commented 5 years ago

The DMI class already had setAdditionalConnectionProperties function, which is used with HydroBaseDataStore and ConnectionProperties datastore property. This needs to be enabled similarly in the TSTool NovaStar datastore plugin. Then we can test the configuration. I did change the code so that a leading semi-colon is not added to the connection string before the ConnectionProperties. This will need to be added in the configuration. The delimiter character varies depending on database. Close the issue.