Skip to content

AbstractEmbeddedDatabaseConfigurer.shutdown does not close JDBC resources [SPR-13474] #18053

@spring-projects-issues

Description

@spring-projects-issues

Jimmy Praet opened SPR-13474 and commented

AbstractEmbeddedDatabaseConfigurer.shutdown opens a JDBC connection to issue a SHUTDOWN command to the database, but does not close this connection.

It might seem unnecessary at first sight to close this connection, as we are shutting down the database anyway. However, for H2 this unclosed connection is triggering its keepOpenStacktrace logging modus. From that point on, it will generate a stacktrace for each opened connection, which is quite costly.


Affects: 3.2.14, 4.1.7, 4.2.1

Referenced from: commits 51a0237, b23c232, aa0f117

Backported to: 4.1.8, 3.2.15

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions