code: public synchronized void checkCurrentPublishJobThread() {
  
          // give the finishing publish thread enough time to clean up
          try {
              Thread.sleep(200);
          } catch (InterruptedException e) {
              // ignore
          }
  
          // create a publish thread only if engine is started
          if (m_engineState != CmsPublishEngineState.ENGINE_STARTED) {
              return;
          }
  
          if (LOG.isDebugEnabled()) {
              LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_ENGINE_RUNNING_0));
          }
  
          // check the driver manager
          if ((m_driverManager == null) || (m_dbContextFactory == null)) {
              LOG.error(Messages.get().getBundle().key(Messages.ERR_PUBLISH_ENGINE_NOT_INITIALIZED_0));
              // without these there is nothing we can do
              return;
          }
  
          // there is no running publish job
          if (m_currentPublishThread == null) {
              // but something is waiting in the queue
              if (!m_publishQueue.isEmpty()) {
                  // start the next waiting publish job
                  CmsPublishJobInfoBean publishJob = m_publishQueue.next();
                  m_currentPublishThread = new CmsPublishThread(this, publishJob);
                  m_currentPublishThread.start();
              } else {
                  // nothing to do
                  if (LOG.isDebugEnabled()) {
                      LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_ENGINE_NO_RUNNING_JOB_0));
                  }
              }
              return;
          }
          if (m_currentPublishThread.isAlive()) {
              // normal running
              // wait until it is finished
              if (LOG.isDebugEnabled()) {
                  LOG.debug(Messages.get().getBundle().key(Messages.LOG_PUBLISH_ENGINE_WAITING_0));
              }
          } else {
              // clean up the dead thread
              abandonThread();
          }
      }
docs: Controls the publish process.<p>