class OCI8::ConnectionPool


conn2 = OCI8.new(username, password, cpool)
# Get another session.
conn1 = OCI8.new(username, password, cpool)
# Pass the connection pool to the third argument.
# Get a session from the pool.
cpool = OCI8::ConnectionPool.new(1, 5, 2, username, password, database)
# username and password are required to establish an implicit primary session.
# Create a connection pool.
Usage:
This is equivalent to Oracle JDBC Driver OCI Connection Pooling.
See: {Oracle Call Interface Manual}[http://docs.oracle.com/cd/E11882_01/appdev.112/e10646/oci09adv.htm#sthref1479]
physical connections by several sessions to balance loads.
Connection pooling is the use of a group (the pool) of reusable

def busy_count

Returns:
  • (Integer) -
def busy_count
  attr_get_ub4(OCI_ATTR_CONN_BUSY_COUNT)
end

def destroy

def destroy
  free
end

def incr

Returns:
  • (Integer) -
def incr
  attr_get_ub4(OCI_ATTR_CONN_INCR)
end

def max

Returns:
  • (Integer) -
def max
  attr_get_ub4(OCI_ATTR_CONN_MAX)
end

def min

Returns:
  • (Integer) -
def min
  attr_get_ub4(OCI_ATTR_CONN_MIN)
end

def nowait=(val)

Parameters:
  • val (Boolean) --
def nowait=(val)
  attr_set_ub1(OCI_ATTR_CONN_NOWAIT, val ? 1 : 0)
end

def nowait?

The default value is false.
maximum. Otherwise the call waits till it gets a connection.
are busy and the number of connections has already reached the
If true, an error is thrown when all the connections in the pool
def nowait?
  attr_get_ub1(OCI_ATTR_CONN_NOWAIT) != 0
end

def open_count

Returns:
  • (Integer) -
def open_count
  attr_get_ub4(OCI_ATTR_CONN_OPEN_COUNT)
end

def timeout

Returns:
  • (Integer) -
def timeout
  attr_get_ub4(OCI_ATTR_CONN_TIMEOUT)
end

def timeout=(val)

Parameters:
  • val (Integer) --
def timeout=(val)
  attr_set_ub4(OCI_ATTR_CONN_TIMEOUT, val)
end