[rhmessaging-commits] rhmessaging commits: r1432 - store/trunk/cpp/lib.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Thu Dec 6 08:08:32 EST 2007
Author: gordonsim
Date: 2007-12-06 08:08:31 -0500 (Thu, 06 Dec 2007)
New Revision: 1432
Modified:
store/trunk/cpp/lib/BdbMessageStore.cpp
Log:
Move environment open into its own try catch; no need to abort if this fails.
Fixes BZ413751
Modified: store/trunk/cpp/lib/BdbMessageStore.cpp
===================================================================
--- store/trunk/cpp/lib/BdbMessageStore.cpp 2007-12-05 15:26:25 UTC (rev 1431)
+++ store/trunk/cpp/lib/BdbMessageStore.cpp 2007-12-06 13:08:31 UTC (rev 1432)
@@ -81,11 +81,18 @@
string bdbdir = storeDir + "/rhm/dat/";
journal::jdir::create_dir(bdbdir);
- TxnCtxt txn;
- bool ret = false;
+
+
+ bool ret = false;
try {
env.open(bdbdir.c_str(), DB_THREAD | DB_CREATE | DB_INIT_TXN | DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_USE_ENVIRON, 0);
+ } catch (const DbException& e) {
+ THROW_STORE_EXCEPTION_2("Error opening environment", e);
+ }
+ TxnCtxt txn;
+ try {
+
txn.begin(env, false);
open(queueDb, txn.get(), "queues.db", false);
open(configDb, txn.get(), "config.db", false);
More information about the rhmessaging-commits
mailing list