Skip to content

Commit

Permalink
Fix closing transaction manager (#2753)
Browse files Browse the repository at this point in the history
  • Loading branch information
kumuwu authored Apr 8, 2024
1 parent 9bc80ba commit f4472d4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,20 @@ public void revertTransaction()
@Override
public void closeTransactionManager()
{
try
{
this.transactionManager.close();
}
catch (SQLException e)
{
throw new RuntimeException(e);
}
finally
if (this.transactionManager != null)
{
this.transactionManager = null;
try
{
this.transactionManager.close();
}
catch (SQLException e)
{
throw new RuntimeException(e);
}
finally
{
this.transactionManager = null;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ public JdbcTransactionManager(Connection connection) throws SQLException

public void close() throws SQLException
{
this.statement.close();
if (this.statement != null)
{
this.statement.close();
}
}

public void beginTransaction() throws SQLException
Expand Down

0 comments on commit f4472d4

Please sign in to comment.