|
|
| version 1.3, 2001/04/05 08:09:24 | version 1.5, 2001/04/05 11:50:09 |
|---|---|
| Line 66 SQL_Connection& SQL_Driver_manager::get_ | Line 66 SQL_Connection& SQL_Driver_manager::get_ |
| // first trying to get cached connection | // first trying to get cached connection |
| if(SQL_Connection *result=get_connection_from_cache(url)) | if(SQL_Connection *result=get_connection_from_cache(url)) |
| return *result; | if(result->ping()) |
| return *result; | |
| else | |
| result->disconnect(); // kill unpingabe=dead connection | |
| // no cached connection | // no cached connection |
| int pos=url.pos("://", 3); | int pos=url.pos("://", 3); |
| Line 130 SQL_Connection& SQL_Driver_manager::get_ | Line 133 SQL_Connection& SQL_Driver_manager::get_ |
| put_driver_to_cache(protocol, *driver); | put_driver_to_cache(protocol, *driver); |
| } | } |
| // associate with request | // services associated with request |
| Services_for_SQL_driver_impl& services= | Services_for_SQL_driver_impl& services= |
| *new(pool) Services_for_SQL_driver_impl(pool, url); | *new(pool) Services_for_SQL_driver_impl(pool, url); |
| // allocate in global pool. associate with services[request] | // allocate in global pool |
| // associate with services[request], deassociates at close | |
| SQL_Connection& result= | SQL_Connection& result= |
| *new(this->pool()) SQL_Connection(this->pool(), url, *driver, services, url_cstr); | *new(this->pool()) SQL_Connection(this->pool(), url, *driver, services, url_cstr); |