Default implementation of IConnectionPool. It is consists of four worker thread that holding
corresponding connection lists: closed connections, connecting connections, free connections and
quering connections.
*
Closed connections thread accepts connection to a SQL server and waits specified moment to
start establishing process. All failed connections are passed into the worker to try again
later.
*
Connecting connections thread handles connection establishing procedure. Connection establishing
process is done in asynchronous way (non-blocking polling). All new connections are passed to
the worker. If connection is failed, it is passed to closed connections thread, else if it successes,
it is passed to free connections thread.
*
Free connections thread watch after idle connections. If one want to make a query, pool asks the
free connections worker for one. If there is no free connection for specified amount of time,
timeout exception is thrown, else returned connection is binded with transaction information and
is sent to quering connections worker. Also free connections worker watches after health of each
connection, if a free connection dies, it is sent to closed connections process to try to open later.
And finally the most interesting one is quering connections worker. The worker accepts all requested
transaction to be proceeded on a remote SQL server (several connection could be linked to different servers).
Worker starts the transaction, setups all needed local variables and proceeds all requested commands,
collects results and transfer them to pool inner queue of finished transactions. Transaction is ended with
"COMMIT;" before sending connection to free connections worker.
*
Default implementation of IConnectionPool. It is consists of four worker thread that holding corresponding connection lists: closed connections, connecting connections, free connections and quering connections. * Closed connections thread accepts connection to a SQL server and waits specified moment to start establishing process. All failed connections are passed into the worker to try again later. * Connecting connections thread handles connection establishing procedure. Connection establishing process is done in asynchronous way (non-blocking polling). All new connections are passed to the worker. If connection is failed, it is passed to closed connections thread, else if it successes, it is passed to free connections thread. * Free connections thread watch after idle connections. If one want to make a query, pool asks the free connections worker for one. If there is no free connection for specified amount of time, timeout exception is thrown, else returned connection is binded with transaction information and is sent to quering connections worker. Also free connections worker watches after health of each connection, if a free connection dies, it is sent to closed connections process to try to open later.
And finally the most interesting one is quering connections worker. The worker accepts all requested transaction to be proceeded on a remote SQL server (several connection could be linked to different servers). Worker starts the transaction, setups all needed local variables and proceeds all requested commands, collects results and transfer them to pool inner queue of finished transactions. Transaction is ended with "COMMIT;" before sending connection to free connections worker. *