- beanNodeMapper.saveOrUpdate(getSession(), basePath(slcExecution),
- slcExecution);
-
- // TODO: optimize with piped streams
- // marshaller.marshal(slcExecution, result);
- // in = new ByteArrayInputStream(result.toString().getBytes());
- //
- // String basePath = basePath(slcExecution);
- // JcrUtils.mkdirs(getSession(), basePath);
- //
- // session.importXML(basePath(slcExecution), in,
- // ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING);
-
- JcrUtils.debug(session.getRootNode());
- session.save();
- } catch (Exception e) {
- throw new SlcException("Cannot import " + slcExecution, e);
- } finally {
- IOUtils.closeQuietly(in);
+ nodeMapper.save(getSession(), basePath(slcExecution), slcExecution);
+ getSession().save();
+ } catch (RepositoryException e) {
+ throw new SlcException("Cannot create slcExecution" + slcExecution,
+ e);