public void loadRoles(ClassLoader cl) throws ObjectStoreConfigException {
try {
ClassLoader first = RoleClassLoader.class.getClassLoader();
Set<URL> loaded;
loaded = load(new CheckForAnnotation(first), first, "annotations", ANNOTATIONS, true, new HashSet<URL>());
loaded = load(new CheckForAnnotation(cl), cl, "annotations", ANNOTATIONS, true, loaded);
loaded = load(new CheckForConcept(first), first, "concepts", CONCEPTS, true, new HashSet<URL>());
loaded = load(new CheckForConcept(cl), cl, "concepts", CONCEPTS, true, loaded);
loaded = load(new CheckForBehaviour(first), first, "behaviours", BEHAVIOURS, false, new HashSet<URL>());
loaded = load(new CheckForBehaviour(cl), cl, "behaviours", BEHAVIOURS, false, loaded);
scanConceptsWithReflections();
Collection<Class<?>> concepts = roleMapper.getConceptClasses();
for(Class<?> conceptClass : concepts) {
logger.debug("Registered concept class " + conceptClass.getCanonicalName());
}
} catch (ObjectStoreConfigException e) {
throw e;
} catch (Exception e) {
throw new ObjectStoreConfigException(e);
}
}