Skip to content

Commit 485c31b

Browse files
Close database connections after query executions.
Previously, database connections were left open after query execution, which could lead to resource leaks. This update ensures connections are properly closed to improve resource management and system stability.
1 parent c07a9be commit 485c31b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/fr/abes/sudoc/component/BaseXmlFunctionsCaller.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public List<String> issnToPpn(String issn) throws UncategorizedSQLException, SQL
4141
while (rs.next()) {
4242
resultList.add(rs.getString("ppn"));
4343
}
44-
44+
connection.close();
4545
return resultList;
4646
}
4747

@@ -57,7 +57,7 @@ public String isbnToPpn(String isbn) throws UncategorizedSQLException, SQLExcept
5757
if (rs.next()) {
5858
result = rs.getString("ppn");
5959
}
60-
60+
connection.close();
6161
return result;
6262
}
6363

@@ -72,7 +72,7 @@ public List<String> doiToPpn(String doi) throws UncategorizedSQLException, SQLEx
7272
while (rs.next()) {
7373
resultList.add(rs.getString("ppn"));
7474
}
75-
75+
connection.close();
7676
return resultList;
7777
}
7878

0 commit comments

Comments
 (0)