Skip to content

Method "reset" missing in class JDBCConnection #2476

@rammpeter

Description

@rammpeter

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions