code: protected void add(CmsPublishJobInfoBean publishJob) throws CmsException {
  
          OpenCms.getMemoryMonitor().cachePublishJobInHistory(publishJob);
          // write job to db if necessary
          if (OpenCms.getMemoryMonitor().requiresPersistency()) {
              CmsDbContext dbc = m_publishEngine.getDbContext(null);
              try {
                  m_publishEngine.getDriverManager().writePublishJob(dbc, publishJob);
                  // additionally, write the publish report
                  m_publishEngine.getDriverManager().writePublishReport(dbc, publishJob);
                  // delete publish list of started job
                  m_publishEngine.getDriverManager().deletePublishList(dbc, publishJob.getPublishHistoryId());
              } catch (CmsException e) {
                  dbc.rollback();
                  LOG.error(e.getLocalizedMessage(), e);
                  throw e;
              } finally {
                  dbc.clear();
              }
          }
      }
docs: Adds the given publish job to the list.<p>
  
  @param publishJob the publish job object to add
  
  @throws CmsException if something goes wrong