Skip to content

Commit

Permalink
HTM-1110: Add timeout to JDBC data stores (#945)
Browse files Browse the repository at this point in the history
  • Loading branch information
mprins authored Sep 10, 2024
2 parents b7b9f9b + f723ef2 commit b39aa26
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import static org.geotools.jdbc.JDBCDataStoreFactory.EXPOSE_PK;
import static org.geotools.jdbc.JDBCDataStoreFactory.FETCHSIZE;
import static org.geotools.jdbc.JDBCDataStoreFactory.HOST;
import static org.geotools.jdbc.JDBCDataStoreFactory.MAXWAIT;
import static org.geotools.jdbc.JDBCDataStoreFactory.PASSWD;
import static org.geotools.jdbc.JDBCDataStoreFactory.PK_METADATA_TABLE;
import static org.geotools.jdbc.JDBCDataStoreFactory.PORT;
Expand Down Expand Up @@ -68,6 +69,7 @@ public DataStore createDataStore(TMFeatureSource tmfs, Integer timeout) throws I
params.put(FETCHSIZE.key, c.getFetchSize());
params.put(EXPOSE_PK.key, true);
params.put(PK_METADATA_TABLE.key, c.getPrimaryKeyMetadataTable());
params.put(MAXWAIT.key, timeout);
if (c.getDbtype() != JDBCConnectionProperties.DbtypeEnum.ORACLE) {
// this key is available in ao. Oracle and MS SQL datastore factories, but not in the common
// parent...
Expand Down

0 comments on commit b39aa26

Please sign in to comment.