EnvironmentConfig envConfig = new EnvironmentConfig();
envConfig.setAllowCreate(false);
envConfig.setTransactional(true);
envConfig.setDurability(durability);
ReplicationConfig repConfig = new ReplicationConfig();
repConfig.setConfigParam
(ReplicationConfig.ENV_CONSISTENCY_TIMEOUT, "1 min");
repConfig.setGroupName(groupName);
repConfig.setNodeName(nodeName);
int port = Integer.parseInt(RepParams.DEFAULT_PORT.getDefault());
String hostName = host + ":" + port;
repConfig.setNodeHostPort(hostName);
repConfig.setHelperHosts(hostName);
final ReplicatedEnvironment rep =
RepInternal.createDetachedEnv(envHome, repConfig, envConfig);
try {
ReplicatedEnvironment.State state = rep.getState();
if (state != ReplicatedEnvironment.State.DETACHED) {