diff options
author | deva <deva> | 2010-06-10 07:03:06 +0000 |
---|---|---|
committer | deva <deva> | 2010-06-10 07:03:06 +0000 |
commit | 198b0d886817f2c5bc97cfd11857d4b314dffae3 (patch) | |
tree | 4fc2d51de46ab69b9e67149abf0ab6a332032f27 /server/src/environment.cc | |
parent | 730eb796bbce6f124be9194f1565b7dda1daddf1 (diff) |
Add transaction support on database pr. pracro session. Makes it possible to discard all edited macros.
Diffstat (limited to 'server/src/environment.cc')
-rw-r--r-- | server/src/environment.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/environment.cc b/server/src/environment.cc index 9904afc..f1e035e 100644 --- a/server/src/environment.cc +++ b/server/src/environment.cc @@ -34,11 +34,12 @@ Environment::Environment() : macrolist(Conf::xml_basedir + "/macros"), templatelist(Conf::xml_basedir + "/templates") { + /* for(int i = 0; i < Conf::database_poolsize; i++) { dbpool.add(new Database(Conf::database_backend, Conf::database_addr, "", Conf::database_user, Conf::database_passwd, "")); } - + */ for(int i = 0; i < Conf::artefact_poolsize; i++) { atfpool.add(new Artefact); } @@ -46,6 +47,7 @@ Environment::Environment() Environment::~Environment() { + /* // Remove, but wait until resources are released std::list<Database*> dblst = dbpool.clear(false); std::list<Database*>::iterator i = dblst.begin(); @@ -53,7 +55,7 @@ Environment::~Environment() delete *i; i++; } - + */ // Remove, but wait until resources are released std::list<Artefact*> atflst = atfpool.clear(false); std::list<Artefact*>::iterator j = atflst.begin(); |