code: public void commit(QPath path) throws RepositoryException, AccessDeniedException, ReferentialIntegrityException,
        InvalidItemStateException, ItemExistsException
     {
        // validate all, throw an exception if validation failed
        validate(path);
  
        PlainChangesLog cLog = changesLog.pushLog(path);
  
        if (LOG.isDebugEnabled())
        {
           LOG.debug(" ----- commit -------- \n" + cLog.dump());
        }
  
        try
        {
           transactionableManager.save(cLog);
           invalidated.clear();
        }
        catch (AccessDeniedException e)
        {
           remainChangesBack(cLog);
           throw new AccessDeniedException(e);
        }
        catch (InvalidItemStateException e)
        {
           remainChangesBack(cLog);
           throw new InvalidItemStateException(e);
        }
        catch (ItemExistsException e)
        {
           remainChangesBack(cLog);
           throw new ItemExistsException(e);
        }
        catch (ReferentialIntegrityException e)
        {
           remainChangesBack(cLog);
           throw new ReferentialIntegrityException(e);
        }
        catch (RepositoryException e)
        {
           remainChangesBack(cLog);
           throw new RepositoryException(e);
        }
     }
docs: Commit changes
  
  @param path
  @throws RepositoryException
  @throws AccessDeniedException
  @throws ReferentialIntegrityException
  @throws InvalidItemStateException