[DB] Use a single shared pool of connections to the database

This commit is contained in:
emeric
2015-08-19 13:31:50 +02:00
parent 4b35e03ef8
commit e18221689f
23 changed files with 89 additions and 62 deletions
+4 -2
View File
@@ -23,6 +23,8 @@
#include <boost/filesystem.hpp>
#include <Wt/WApplication>
#include <Wt/Dbo/SqlConnectionPool>
#include "database/DatabaseHandler.hpp"
#include "resource/CoverResource.hpp"
@@ -31,10 +33,10 @@ namespace UserInterface {
class LmsApplication : public Wt::WApplication
{
public:
static Wt::WApplication *create(const Wt::WEnvironment& env, boost::filesystem::path dbPath);
static Wt::WApplication *create(const Wt::WEnvironment& env, Wt::Dbo::SqlConnectionPool& connectionPool);
static LmsApplication* instance();
LmsApplication(const Wt::WEnvironment& env, boost::filesystem::path dbPath);
LmsApplication(const Wt::WEnvironment& env, Wt::Dbo::SqlConnectionPool& connectionPool);
// Session application data
CoverResource* getCoverResource() { return _coverResource; }