@Transactional(readOnly=false) @Override public Object doWork(Session session, ServiceFactory sf) { MapAnnotation ma = new MapAnnotation(); ma.setNs(NAMESPACE); ma.setDescription(parseStream(stream)); ma.setMapValue(new ArrayList<NamedValue>()); ma.getMapValue().add(new NamedValue("from", from)); ma.getMapValue().add(new NamedValue("to", recipient)); ma = sf.getUpdateService().saveAndReturnObject(ma); log.info("Saved email: MapAnnotation:" + ma.getId()); return ma; }}); }