// open the source env history DB, copying entries to target env
EnhancedEnvironment sourceEnv = setupCopyEnvironment(sourceDir, true);
StoredClassCatalog sourceClassCatalog = sourceEnv.getClassCatalog();
DatabaseConfig historyDbConfig = HISTORY_DB_CONFIG.toDatabaseConfig();
historyDbConfig.setReadOnly(true);
Database sourceHistoryDB = sourceEnv.openDatabase(
null, URI_HISTORY_DBNAME, historyDbConfig);
StoredSortedMap<String,Map> sourceHistoryMap = new StoredSortedMap<String,Map>(sourceHistoryDB,
new StringBinding(), new SerialBinding<Map>(sourceClassCatalog,
Map.class), true);