public void updateDocument(DocumentVersion document) { Session session = null; try { session = BasicDaoFactory.getSystemSession(); jcrDocumentDao.updateNodeDocument(session, document); session.save(); } catch (RepositoryException ex) { SilverTrace.error("document", "JcrDocumentServiceImpl", "document.jcr.create.exception", ex); throw new VersioningRuntimeException( "JcrDocumentServiceImpl", SilverpeasRuntimeException.ERROR, "document.jcr.delete.exception", ex); } catch (IOException ex) { SilverTrace.error("document", "JcrDocumentServiceImpl", "document.jcr.create.exception", ex); throw new VersioningRuntimeException( "JcrDocumentServiceImpl", SilverpeasRuntimeException.ERROR, "document.jcr.delete.exception", ex); } finally { if (session != null) { session.logout(); } } }