/** * Called when the queue is full to remove the oldest element.<p> * * @see org.apache.commons.collections.buffer.BoundedFifoBuffer#remove() */ @Override public Object remove() { CmsPublishJobInfoBean publishJob = (CmsPublishJobInfoBean)super.remove(); try { OpenCms.getPublishManager().getEngine().getPublishHistory().remove(publishJob); } catch (CmsException exc) { if (LOG.isErrorEnabled()) { LOG.error(exc.getLocalizedMessage(), exc); } } return publishJob; } }, CmsPublishJobInfoBean.class));
/** * Called when the queue is full to remove the oldest element.<p> * * @see org.apache.commons.collections.buffer.BoundedFifoBuffer#remove() */ @Override public Object remove() { CmsPublishJobInfoBean publishJob = (CmsPublishJobInfoBean)super.remove(); try { OpenCms.getPublishManager().getEngine().getPublishHistory().remove(publishJob); } catch (CmsException exc) { if (LOG.isErrorEnabled()) { LOG.error(exc.getLocalizedMessage(), exc); } } return publishJob; } }, CmsPublishJobInfoBean.class));
/** * 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 { 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); } }