GetConnectionPool() static public method

Get a connection pool. If it doesn't exist yet, create it
static public GetConnectionPool ( DB2ConnectionSettings connectionSettings ) : DB2ConnectionPool
connectionSettings DB2ConnectionSettings
return DB2ConnectionPool
Example #1
0
        public static DB2ConnectionSettings GetConnectionSettings(string connectionString)
        {
            DB2ConnectionPool pool = DB2ConnectionPool.FindConnectionPool(connectionString);

            if (pool != null)
            {
                return(pool.ConnectionSettings);
            }
            DB2ConnectionSettings settings = new DB2ConnectionSettings(connectionString);

            if (settings.Pooling)
            {
                settings.pool = DB2ConnectionPool.GetConnectionPool(settings);
            }
            return(settings);
        }