code: void save(final ChangesLogWrapper logWrapper, TransactionableResourceManager txResourceManager)
        throws RepositoryException
     {
        final ItemStateChangesLog changesLog = logWrapper.optimizeAndGetChangesLog();
        final ChangesLogPersister persister = new ChangesLogPersister();
  
        // whole log will be reconstructed with persisted data 
        ItemStateChangesLog persistedLog;
        boolean failed = true;
        ConnectionMode mode = getMode(txResourceManager);
        try
        {
           persister.init(mode, txResourceManager);
           if (changesLog instanceof TransactionChangesLog)
           {
              TransactionChangesLog orig = (TransactionChangesLog)changesLog;
  
              TransactionChangesLog persisted = new TransactionChangesLog();
              persisted.setSystemId(orig.getSystemId());
  
              for (ChangesLogIterator iter = orig.getLogIterator(); iter.hasNextLog();)
              {
                 persisted.addLog(persister.save(iter.nextLog()));
              }
  
              persistedLog = persisted;
           }
           else
           {
              // we don't support other types now... i.e. add else-if for that type here
              throw new RepositoryException("Unsupported changes log class " + changesLog.getClass());
           }
           // replace log with persisted data only
           logWrapper.setLog(persistedLog);
           persister.prepare();
           notifySaveItems(persistedLog, true);
           onCommit(persister, mode, txResourceManager);
           failed = false;
        }
        catch (IOException e)
        {
           throw new RepositoryException("Save error", e);
        }
        finally
        {
          try {
            persister.clear();
            if (failed) {
              persister.rollback();
            }
          } catch (Exception e) {
            LOG.warn("Error while rollbacking changelog. Save operation exception log will be added below rollback exception log", e);
          }
        }
     }
docs: {@inheritDoc}