@@ -47,41 +47,6 @@ protected static Task<DbConnectionInternal> GetCompletedTask()
47
47
return s_completedTask ?? ( s_completedTask = Task . FromResult < DbConnectionInternal > ( null ) ) ;
48
48
}
49
49
50
- protected IDbConnectionPool GetConnectionPool ( DbConnection owningObject , DbConnectionPoolGroup connectionPoolGroup )
51
- {
52
- // if poolgroup is disabled, it will be replaced with a new entry
53
-
54
- Debug . Assert ( owningObject != null , "null owningObject?" ) ;
55
- Debug . Assert ( connectionPoolGroup != null , "null connectionPoolGroup?" ) ;
56
-
57
- // It is possible that while the outer connection object has
58
- // been sitting around in a closed and unused state in some long
59
- // running app, the pruner may have come along and remove this
60
- // the pool entry from the master list. If we were to use a
61
- // pool entry in this state, we would create "unmanaged" pools,
62
- // which would be bad. To avoid this problem, we automagically
63
- // re-create the pool entry whenever it's disabled.
64
-
65
- // however, don't rebuild connectionOptions if no pooling is involved - let new connections do that work
66
- if ( connectionPoolGroup . IsDisabled && connectionPoolGroup . PoolGroupOptions != null )
67
- {
68
- SqlClientEventSource . Log . TryTraceEvent ( "<prov.DbConnectionFactory.GetConnectionPool|RES|INFO|CPOOL> {0}, DisabledPoolGroup={1}" , ObjectID , connectionPoolGroup ? . ObjectID ) ;
69
-
70
- // reusing existing pool option in case user originally used SetConnectionPoolOptions
71
- DbConnectionPoolGroupOptions poolOptions = connectionPoolGroup . PoolGroupOptions ;
72
-
73
- // get the string to hash on again
74
- DbConnectionOptions connectionOptions = connectionPoolGroup . ConnectionOptions ;
75
- Debug . Assert ( connectionOptions != null , "prevent expansion of connectionString" ) ;
76
-
77
- connectionPoolGroup = GetConnectionPoolGroup ( connectionPoolGroup . PoolKey , poolOptions , ref connectionOptions ) ;
78
- Debug . Assert ( connectionPoolGroup != null , "null connectionPoolGroup?" ) ;
79
- SetConnectionPoolGroup ( owningObject , connectionPoolGroup ) ;
80
- }
81
- IDbConnectionPool connectionPool = connectionPoolGroup . GetConnectionPool ( ( SqlConnectionFactory ) this ) ;
82
- return connectionPool ;
83
- }
84
-
85
50
internal DbConnectionPoolGroup GetConnectionPoolGroup ( DbConnectionPoolKey key , DbConnectionPoolGroupOptions poolOptions , ref DbConnectionOptions userConnectionOptions )
86
51
{
87
52
if ( string . IsNullOrEmpty ( key . ConnectionString ) )
0 commit comments