[HER-1706] PersistLoadProcessor and PersistStoreProcessor can't share same BdbModule

* BdbModule.java
    allow Database instance reuse if BdbConfig is identical instance
* PersistProcessor.java
    convert shared BdbConfig for history db to static constant HISTORY_DB_CONFIG
* PersistOnlineProcessor.java
    use HISTORY_DB_CONFIG, don't close possibly-shared DB on stop()
* PrecedenceLoader.java, PreloadedUriPrecedencePolicy.java
    use HISTORY_DB_CONFIG
This commit is contained in:
gojomo committed 2009-11-10 23:48:10 +00:00
1 parent 0497efbb32
commit dd0ca367c3
5 files changed
+15 -12

No files matched your search

@@ -110,7 +110,7 @@ public class PrecedenceLoader {
Database historyDB = targetEnv.openDatabase(
null,
PersistProcessor.URI_HISTORY_DBNAME,
PersistProcessor.historyDatabaseConfig().toDatabaseConfig());
PersistProcessor.HISTORY_DB_CONFIG.toDatabaseConfig());
StoredSortedMap historyMap = new StoredSortedMap(historyDB,
new StringBinding(), new SerialBinding(classCatalog,
Map.class), true);
@@ -79,7 +79,7 @@ implements Lifecycle {
StoredSortedMap historyMap;
try {
StoredClassCatalog classCatalog = bdb.getClassCatalog();
BdbModule.BdbConfig dbConfig = PersistProcessor.historyDatabaseConfig();
BdbModule.BdbConfig dbConfig = PersistProcessor.HISTORY_DB_CONFIG;
historyDb = bdb.openManagedDatabase(dbName, dbConfig, true);
historyMap = new StoredSortedMap(historyDb,