Пример #1
0
            public override void Open()
            {
                if (innerConnection == null)
                {
                    innerConnection = connectionPool.Pop();
                }


                switch (innerConnection.State)
                {
                case ConnectionState.Closed:
                    innerConnection.Open();
                    break;

                case ConnectionState.Broken:
                    try
                    {
                        innerConnection.Close();
                    }
                    catch
                    {
                    }
                    try
                    {
                        innerConnection.Open();
                    }
                    catch
                    {
                    }
                    break;
                }
                state = innerConnection.State;
            }
Пример #2
0
 public OracleConnection(OracleConnectionPool connectionPool)
     : base(connectionPool.Pop())
 {
     this.connectionPool = connectionPool;
 }