if(map.containsKey("CLASSNAME")){
Class<PersistentEntity> clazz;
try {
clazz = (Class<PersistentEntity>)
Class.forName((String)map.get("CLASSNAME"));
PersistentEntity pe = clazz.newInstance();
pe.initFromMap(map);
msgRecEvent.fire(pe);
} catch (ClassNotFoundException e) {
log.warn("Map containing classname, but could not instantiate it. ", e);
} catch (InstantiationException e) {
e.printStackTrace();