|
|
| version 1.69.2.16, 2003/03/08 12:22:06 | version 1.69.2.17, 2003/03/13 12:34:21 |
|---|---|
| Line 55 static void expire_connections( | Line 55 static void expire_connections( |
| // SQL_Driver_manager | // SQL_Driver_manager |
| SQL_Driver_manager::SQL_Driver_manager(): | SQL_Driver_manager::SQL_Driver_manager(): |
| prev_expiration_pass_time(0) { | prev_expiration_pass_time(0), is_dlinited(false) { |
| cache_managers.put(StringPtr(new String("sql")), this); | cache_managers.put(StringPtr(new String("sql")), this); |
| } | } |
| SQL_Driver_manager::~SQL_Driver_manager() { | SQL_Driver_manager::~SQL_Driver_manager() { |
| connection_cache.for_each(expire_connections, time(0)+(time_t)1/*=in future=expire all*/); | connection_cache.for_each(expire_connections, time(0)+(time_t)1/*=in future=expire all*/); |
| if(is_dlinited) | |
| lt_dlexit(); | |
| } | } |
| /// @param aurl protocol://[driver-dependent] | /// @param aurl protocol://[driver-dependent] |
| Line 124 SQL_ConnectionPtr SQL_Driver_manager::ge | Line 127 SQL_ConnectionPtr SQL_Driver_manager::ge |
| "undefined protocol '%s'", | "undefined protocol '%s'", |
| request_protocol_cstr); | request_protocol_cstr); |
| if(lt_dlinit()) | if(!is_dlinited) { |
| throw Exception(0, | if(lt_dlinit()) |
| library, | throw Exception(0, |
| "prepare to dynamic loading failed, %s", lt_dlerror()); | library, |
| "prepare to dynamic loading failed, %s", lt_dlerror()); | |
| is_dlinited=true; | |
| } | |
| CharPtr filename=library->cstr(String::UL_FILE_SPEC); | CharPtr filename=library->cstr(String::UL_FILE_SPEC); |
| lt_dlhandle handle=lt_dlopen(filename); | lt_dlhandle handle=lt_dlopen(filename); |