db = new Db(env, 0);
db.open(null, "index1.db", null, type, openFlags, 0);
index1 = factory.newDataIndex(store1, db, "1", false, true);
db = new Db(env, 0);
db.open(null, "store2.db", null, type, openFlags, 0);
store2 = factory.newDataStore(db, MarshalledObject.class, null);
db = new Db(env, 0);
db.open(null, "index2.db", null, type, openFlags, 0);
index2 = factory.newForeignKeyIndex(store2, db, "2", false, true,