|
|
| version 1.79, 2001/09/30 12:27:59 | version 1.85, 2001/10/27 10:31:10 |
|---|---|
| Line 12 | Line 12 |
| #include "pa_hash.h" | #include "pa_hash.h" |
| #include "pa_sql_driver_manager.h" | #include "pa_sql_driver_manager.h" |
| #include "pa_dictionary.h" | #include "pa_dictionary.h" |
| #include "pa_xslt_stylesheet_manager.h" | #include "pa_stylesheet_manager.h" |
| #include "pa_charset_manager.h" | |
| #include "pa_sapi.h" | |
| #ifdef XML | #ifdef HAVE_LIBDB |
| #include <util/PlatformUtils.hpp> | #include "pa_db_manager.h" |
| #include <XalanTransformer/XalanTransformer.hpp> | |
| #endif | #endif |
| String *user_html_name; | String *user_html_name; |
| Line 37 String *content_disposition_name; | Line 38 String *content_disposition_name; |
| String *content_disposition_filename_name; | String *content_disposition_filename_name; |
| String *unnamed_name; | String *unnamed_name; |
| String *empty_string; | |
| String *auto_method_name; | String *auto_method_name; |
| String *main_method_name; | String *main_method_name; |
| Line 99 static void setup_hex_value() { | Line 99 static void setup_hex_value() { |
| hex_value['f'] = 15; | hex_value['f'] = 15; |
| } | } |
| void pa_globals_destroy(void *) { | |
| try { | |
| // SQL driver manager | |
| if(SQL_driver_manager) | |
| SQL_driver_manager->~SQL_Driver_manager(); | |
| #ifdef HAVE_LIBDB | |
| // DB driver manager | |
| if(DB_manager) | |
| DB_manager->~DB_Manager(); | |
| #endif | |
| #ifdef XML | |
| // XSLT stylesheet driver manager | |
| if(stylesheet_manager) | |
| stylesheet_manager->~Stylesheet_manager(); | |
| #endif | |
| // Charset manager | |
| if(charset_manager) | |
| charset_manager->~Charset_manager(); | |
| } catch(const Exception& e) { | |
| SAPI::die("pa_globals_destroy failed: %s", e.comment()); | |
| } | |
| } | |
| void pa_globals_init(Pool& pool) { | void pa_globals_init(Pool& pool) { |
| pool.register_cleanup(pa_globals_destroy, 0); | |
| #undef NEW | #undef NEW |
| #define NEW new(pool) | #define NEW new(pool) |
| Line 125 void pa_globals_init(Pool& pool) { | Line 155 void pa_globals_init(Pool& pool) { |
| content_disposition_filename_name=NEW String(pool, CONTENT_DISPOSITION_FILENAME_NAME); | content_disposition_filename_name=NEW String(pool, CONTENT_DISPOSITION_FILENAME_NAME); |
| unnamed_name=NEW String(pool, UNNAMED_NAME); | unnamed_name=NEW String(pool, UNNAMED_NAME); |
| empty_string=NEW String(pool); | |
| auto_method_name=NEW String(pool, AUTO_METHOD_NAME); | auto_method_name=NEW String(pool, AUTO_METHOD_NAME); |
| main_method_name=NEW String(pool, MAIN_METHOD_NAME); | main_method_name=NEW String(pool, MAIN_METHOD_NAME); |
| Line 196 void pa_globals_init(Pool& pool) { | Line 225 void pa_globals_init(Pool& pool) { |
| // SQL driver manager | // SQL driver manager |
| SQL_driver_manager=NEW SQL_Driver_manager(pool); | SQL_driver_manager=NEW SQL_Driver_manager(pool); |
| #ifdef XML | #ifdef HAVE_LIBDB |
| // Xerces & Xalan | // DB driver manager |
| DB_manager=NEW DB_Manager(pool); | |
| // Use the static initializers to initialize the Xalan-C++ and Xerces-C++ platforms. | #endif |
| // You must initialize Xerces-C++ once per process | |
| XMLPlatformUtils::Initialize(); | |
| XalanTransformer::initialize(); | |
| #ifdef XML | |
| // XSLT stylesheet driver manager | // XSLT stylesheet driver manager |
| XSLT_stylesheet_manager=NEW XSLT_Stylesheet_manager(pool); | stylesheet_manager=NEW Stylesheet_manager(pool); |
| #endif | #endif |
| // Charset manager | |
| charset_manager=NEW Charset_manager(pool); | |
| } | } |
| #if defined(XML) && defined(_MSC_VER) | #if defined(XML) && defined(_MSC_VER) |
| Line 236 void pa_globals_init(Pool& pool) { | Line 266 void pa_globals_init(Pool& pool) { |
| # pragma comment(lib, XALAN_BUILD_WIN32_BUILD "/Release/XSLT.lib") | # pragma comment(lib, XALAN_BUILD_WIN32_BUILD "/Release/XSLT.lib") |
| # endif | # endif |
| #endif | #endif |
| #if defined(HAVE_LIBDB) && defined(_MSC_VER) | |
| # define LIBDB_WIN32_BUILD "/parser3project/win32db/lib" | |
| # ifdef _DEBUG | |
| # pragma comment(lib, LIBDB_WIN32_BUILD "/debug/libdb.lib") | |
| # else | |
| # pragma comment(lib, LIBDB_WIN32_BUILD "/release/libdb.lib") | |
| # endif | |
| #endif | |