@@ -235,20 +235,20 @@ public void processRow(ResultSet rs) throws SQLException {
235
235
* @param password db username's password
236
236
*/
237
237
public NominatimConnector (String host , int port , String database , String username , String password ) {
238
- BasicDataSource dataSource = buildDataSource (host , port , database , username , password );
238
+ BasicDataSource dataSource = buildDataSource (host , port , database , username , password , false );
239
239
240
240
template = new JdbcTemplate (dataSource );
241
241
template .setFetchSize (100000 );
242
242
}
243
243
244
- static BasicDataSource buildDataSource (String host , int port , String database , String username , String password ) {
244
+ static BasicDataSource buildDataSource (String host , int port , String database , String username , String password , boolean autocommit ) {
245
245
BasicDataSource dataSource = new BasicDataSource ();
246
246
247
247
dataSource .setUrl (String .format ("jdbc:postgres_jts://%s:%d/%s" , host , port , database ));
248
248
dataSource .setUsername (username );
249
249
dataSource .setPassword (password );
250
250
dataSource .setDriverClassName (JtsWrapper .class .getCanonicalName ());
251
- dataSource .setDefaultAutoCommit (false );
251
+ dataSource .setDefaultAutoCommit (autocommit );
252
252
return dataSource ;
253
253
}
254
254
0 commit comments