try
{
ChromatticSession session = persister.getSession();
ConsumersAndGroupsMapping mappings = session.findByPath(ConsumersAndGroupsMapping.class, ConsumersAndGroupsMapping.NODE_NAME);
ConsumerGroupMapping cgm = mappings.createConsumerGroup(name);
mappings.getConsumerGroups().add(cgm);
group.setPersistentKey(cgm.getPersistentKey());
cgm.initFrom(group);
persister.save();
}
catch (Exception e)
{