class Db2Session::Connection

Attributes

trx_time[RW]
userid[RW]

Public Class Methods

new(config, userid, password) click to toggle source
Calls superclass method
# File lib/db2_session/connection.rb, line 7
def initialize(config, userid, password)
  super(config)
  @userid = userid
  singleton_class.define_method(:new_dbclient) do
    DbClient.new(config, userid, password)
  end
  verify_db_connection
end

Public Instance Methods

create_connection_pool() click to toggle source
# File lib/db2_session/connection.rb, line 16
def create_connection_pool
  synchronize do
    return @connection_pool if @connection_pool
    @connection_pool = Pool.new(pool_config) { new_dbclient }
  end
end

Private Instance Methods

verify_db_connection() click to toggle source
# File lib/db2_session/connection.rb, line 24
def verify_db_connection
  with { |conn| true }
end