#2359 - Rename Transaction.getConnection() method to connection() with deprecation

This commit is contained in:
rbygrave
2021-09-08 14:17:30 +12:00
parent 632f04c76b
commit bb9532f42e
21 changed files with 36 additions and 31 deletions
@@ -538,6 +538,12 @@ public interface Transaction extends AutoCloseable {
* Examples of when a developer may wish to use the connection directly are:
* Savepoints, advanced CLOB BLOB use and advanced stored procedure calls.
*/
Connection connection();
/**
* Deprecated migrate to connection().
*/
@Deprecated
Connection getConnection();
/**
@@ -61,7 +61,7 @@ public class SimpleSequenceIdGenerator implements PlatformIdGenerator {
PreparedStatement pstmt = null;
ResultSet rset = null;
try {
c = useTxnConnection ? t.getConnection() : dataSource.getConnection();
c = useTxnConnection ? t.connection() : dataSource.getConnection();
pstmt = c.prepareStatement(sql);
rset = pstmt.executeQuery();
if (rset.next()) {