if (!dbEnvHome.exists()) {
throw new IllegalArgumentException
("Environment home " + dbEnvHome + " doesn't exist");
}
if (!lockEnvironment(readOnly, false)) {
throw new EnvironmentLockedException
(envImpl,
"The environment cannot be locked for " +
(readOnly ? "shared" : "single writer") + " access.");
}
}