oracle-enhanced icon indicating copy to clipboard operation
oracle-enhanced copied to clipboard

Method "reset" missing in class JDBCConnection

Open rammpeter opened this issue 3 months ago • 0 comments

Problems arise using JDBC connection with branch 'release80'

OracleEnhancedAdapter.reconnect uses _connection.reset in line 448 but this method is not declared for JDBCConnection.

A monkey patch workaround works if mapping JDBCConnection.reset to JDBCConnection.reset!

But if the connection can't be reestablished by _connection.reset, then the call on connect in exception handler fails with NameError: undefined local variable or method 'connect' for an instance of ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter

def reconnect
  _connection.reset # tentative
rescue OracleEnhanced::ConnectionException
  connect
end

rammpeter avatar Sep 24 '25 12:09 rammpeter