From f723ef298401e5fcaa0af64e33fdf102f447d993 Mon Sep 17 00:00:00 2001 From: Mark Prins <1165786+mprins@users.noreply.github.com> Date: Tue, 10 Sep 2024 16:54:29 +0200 Subject: [PATCH] HTM-1110: Add the given timout to JDBC connections the passed in value was ignored... --- .../api/geotools/featuresources/JDBCFeatureSourceHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/tailormap/api/geotools/featuresources/JDBCFeatureSourceHelper.java b/src/main/java/org/tailormap/api/geotools/featuresources/JDBCFeatureSourceHelper.java index 6e8047b64..1ffe3104d 100644 --- a/src/main/java/org/tailormap/api/geotools/featuresources/JDBCFeatureSourceHelper.java +++ b/src/main/java/org/tailormap/api/geotools/featuresources/JDBCFeatureSourceHelper.java @@ -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; @@ -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...