public OracleConnectionPool GetConnectionPool(OracleConnectionInfo info, int minPoolSize, int maxPoolSize) { lock (pools) { OracleConnectionPool pool = (OracleConnectionPool)pools [info.ConnectionString]; if (pool == null) { pool = new OracleConnectionPool(this, info, minPoolSize, maxPoolSize); pools [info.ConnectionString] = pool; } return(pool); } }
public OracleConnectionPool GetConnectionPool (OracleConnectionInfo info, int minPoolSize, int maxPoolSize) { lock (pools) { OracleConnectionPool pool = (OracleConnectionPool) pools [info.ConnectionString]; if (pool == null) { pool = new OracleConnectionPool (this, info, minPoolSize, maxPoolSize); pools [info.ConnectionString] = pool; } return pool; } }
protected override void Dispose(bool disposing) { if (!disposed) { if (State == ConnectionState.Open) { Close(); } dataReader = null; transaction = null; oci = null; pool = null; conInfo.Username = string.Empty; conInfo.Database = string.Empty; conInfo.Password = string.Empty; connectionString = null; parsedConnectionString = null; base.Dispose(disposing); disposed = true; } }
public override void Open() { if (State == ConnectionState.Open) { return; } PersistSecurityInfo(); if (!pooling || conInfo.SetNewPassword == true) { oci = new OciGlue(); oci.CreateConnection(conInfo); } else { pool = pools.GetConnectionPool(conInfo, minPoolSize, maxPoolSize); oci = pool.GetConnection(); } state = ConnectionState.Open; CreateStateChange(ConnectionState.Closed, ConnectionState.Open); }
void Open () { if (State == ConnectionState.Open) return; PersistSecurityInfo (); if (!pooling || conInfo.SetNewPassword == true) { oci = new OciGlue (); oci.CreateConnection (conInfo); } else { pool = pools.GetConnectionPool (conInfo, minPoolSize, maxPoolSize); oci = pool.GetConnection (); } state = ConnectionState.Open; CreateStateChange (ConnectionState.Closed, ConnectionState.Open); }
protected override void Dispose (bool disposing) { if (!disposed) { if (State == ConnectionState.Open) Close (); dataReader = null; transaction = null; oci = null; pool = null; conInfo.Username = string.Empty; conInfo.Database = string.Empty; conInfo.Password = string.Empty; connectionString = null; parsedConnectionString = null; base.Dispose (disposing); disposed = true; } }