Iterator<SyncDatabase> databases = dataSet.getDatabases().iterator();
while (databases.hasNext()) {
Locker readLocker = null;
boolean operationOK = false;
DatabaseImpl dbImpl = null;
String dbName = databases.next().getLocalName();
try {
readLocker = LockerFactory.getReadableLocker
(env, null,
false, /* transactional */
false /* readCommittedIsolation */);
dbImpl = envImpl.getDbTree().getDb(readLocker, dbName, null);
if (dbImpl != null) {
syncDbs.put(dbImpl.getId(),
new DbInfo(dbName,
dbImpl.getSortedDuplicates()));
}
operationOK = true;
} finally {
if (dbImpl != null) {
envImpl.getDbTree().releaseDb(dbImpl);