/** * Removes the given job from the list.<p> * * @param publishJob the publish job to remove * * @throws CmsException if something goes wrong */ protected void remove(CmsPublishJobInfoBean publishJob) throws CmsException { try { // signalizes that job will be removed m_publishEngine.publishJobRemoved(publishJob); } finally { // remove publish job from cache OpenCms.getMemoryMonitor().uncachePublishJob(publishJob); } // remove job from database if necessary if (OpenCms.getMemoryMonitor().requiresPersistency()) { CmsDbContext dbc = m_publishEngine.getDbContext(null); try { m_publishEngine.getDriverManager().deletePublishJob(dbc, publishJob.getPublishHistoryId()); } catch (CmsException e) { dbc.rollback(); LOG.error(e.getLocalizedMessage(), e); throw e; } finally { dbc.clear(); } } }
/** * Removes the given job from the list.<p> * * @param publishJob the publish job to remove * * @throws CmsException if something goes wrong */ protected void remove(CmsPublishJobInfoBean publishJob) throws CmsException { OpenCms.getMemoryMonitor().uncachePublishJobInHistory(publishJob); // delete job from db if necessary if (OpenCms.getMemoryMonitor().requiresPersistency()) { CmsDbContext dbc = m_publishEngine.getDbContext(null); try { OpenCms.getPublishManager().getEngine().getDriverManager().deletePublishJob( dbc, publishJob.getPublishHistoryId()); } catch (CmsException e) { dbc.rollback(); LOG.error(e.getLocalizedMessage(), e); throw e; } finally { dbc.clear(); } } m_publishEngine.publishJobRemoved(publishJob); } }
/** * Removes the given job from the list.<p> * * @param publishJob the publish job to remove * * @throws CmsException if something goes wrong */ protected void remove(CmsPublishJobInfoBean publishJob) throws CmsException { try { // signalizes that job will be removed m_publishEngine.publishJobRemoved(publishJob); } finally { // remove publish job from cache OpenCms.getMemoryMonitor().uncachePublishJob(publishJob); } // remove job from database if necessary if (OpenCms.getMemoryMonitor().requiresPersistency()) { CmsDbContext dbc = m_publishEngine.getDbContextFactory().getDbContext(); try { m_publishEngine.getDriverManager().deletePublishJob(dbc, publishJob.getPublishHistoryId()); } finally { dbc.clear(); } } }
/** * Removes the given job from the list.<p> * * @param publishJob the publish job to remove * * @throws CmsException if something goes wrong */ protected void remove(CmsPublishJobInfoBean publishJob) throws CmsException { OpenCms.getMemoryMonitor().uncachePublishJobInHistory(publishJob); // delete job from db if necessary if (OpenCms.getMemoryMonitor().requiresPersistency()) { CmsDbContext dbc = m_publishEngine.getDbContextFactory().getDbContext(); try { OpenCms.getPublishManager().getEngine().getDriverManager().deletePublishJob( dbc, publishJob.getPublishHistoryId()); } finally { dbc.clear(); } } m_publishEngine.publishJobRemoved(publishJob); } }