diff --git a/rcpp_framework.cpp b/rcpp_framework.cpp index 299a232..3085037 100644 --- a/rcpp_framework.cpp +++ b/rcpp_framework.cpp @@ -7,6 +7,10 @@ #include "database_backends/db_init.h" #endif +#if WEB_ENABLED +#include "web/http/session_manager.h" +#endif + #include "platform/platform_initializer.h" // Backends @@ -69,6 +73,10 @@ RCPPFramework::RCPPFramework() { #if DATABASES_ENABLED allocate_database_manager_singleton = true; #endif + +#if WEB_ENABLED + allocate_session_manager_singleton = true; +#endif } RCPPFramework::~RCPPFramework() { @@ -103,6 +111,13 @@ void RCPPFramework::_do_initialize() { manage_object(dbm); } #endif + +#if WEB_ENABLED + if (allocate_session_manager_singleton) { + ::SessionManager *session_manager = new ::SessionManager(); + RCPPFramework::get_singleton()->manage_object(session_manager); + } +#endif } void RCPPFramework::_do_uninitialize() { diff --git a/rcpp_framework.h b/rcpp_framework.h index a43f3b4..0347629 100644 --- a/rcpp_framework.h +++ b/rcpp_framework.h @@ -34,6 +34,10 @@ public: bool allocate_database_manager_singleton; #endif +#if WEB_ENABLED + bool allocate_session_manager_singleton; +#endif + protected: virtual void _do_initialize(); virtual void _do_uninitialize();