| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- //
- // OracleConnectionPoolManager.cs
- //
- // Part of the Mono class libraries at
- // mcs/class/System.Data.OracleClient/System.Data.OracleClient
- //
- // Assembly: System.Data.OracleClient.dll
- // Namespace: System.Data.OracleClient
- //
- // Authors:
- // Hubert FONGARNAND <[email protected]>
- //
- // (C) Copyright Hubert FONGARNAND, 2005
- //
- //
- // Licensed under the MIT/X11 License.
- //
- using System;
- using System.Collections;
- using System.Collections.Specialized;
- using System.ComponentModel;
- using System.Data;
- using System.Data.OracleClient.Oci;
- using System.Drawing.Design;
- using System.EnterpriseServices;
- using System.Text;
- using System.Threading;
- namespace System.Data.OracleClient
- {
- internal class OracleConnectionPoolManager
- {
- Hashtable pools = new Hashtable();
-
- public OracleConnectionPoolManager ()
- {
- }
-
- 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 virtual OciGlue CreateConnection (OracleConnectionInfo info)
- {
- OciGlue oci;
- oci = new OciGlue ();
- oci.CreateConnection (info);
- return oci;
- }
- }
- }
|