// Attempt to get connection group directory
Directory<String, ConnectionGroup> directory =
context.getRootConnectionGroup().getConnectionGroupDirectory();
// Create connection group skeleton
ConnectionGroup connectionGroup = directory.get(identifier);
connectionGroup.setName(name);
if("balancing".equals(type))
connectionGroup.setType(ConnectionGroup.Type.BALANCING);
else if("organizational".equals(type))
connectionGroup.setType(ConnectionGroup.Type.ORGANIZATIONAL);
// Update connection group
directory.update(connectionGroup);
}