CmsDbContext dbc = m_publishEngine.getDbContext(getCms().getRequestContext()); try { m_publishEngine.getDriverManager().publishJob(getCms(), dbc, m_publishJob.getPublishList(), m_report); } catch (Throwable e) { dbc = null; if (m_updateSessionInfo) { OpenCms.getSessionManager().updateSessionInfos(getCms());
/** * Creates a thread that start a new publish job with the given information.<p> * * @param publishEngine the publish engine instance * @param publishJob the publish job to process * * @see org.opencms.publish.CmsPublishManager#getPublishList(org.opencms.file.CmsObject, org.opencms.file.CmsResource, boolean) * @see org.opencms.publish.CmsPublishManager#getPublishList(org.opencms.file.CmsObject) */ protected CmsPublishThread(CmsPublishEngine publishEngine, CmsPublishJobInfoBean publishJob) { super(publishJob.getCmsObject(), Messages.get().getBundle().key(Messages.GUI_PUBLISH_TRHEAD_NAME_0)); m_publishJob = publishJob; m_publishEngine = publishEngine; // if the project to publish is a temporary project if (getCms().getRequestContext().currentProject().getType() == CmsProject.PROJECT_TYPE_TEMPORARY) { // we have to update the user info after publishing m_updateSessionInfo = true; } else { m_updateSessionInfo = false; } try { m_jspLoader = (CmsJspLoader)OpenCms.getResourceManager().getLoader(CmsJspLoader.RESOURCE_LOADER_ID); } catch (ArrayIndexOutOfBoundsException e) { // ignore, loader not configured } }
/** * Creates a thread that start a new publish job with the given information.<p> * * @param publishEngine the publish engine instance * @param publishJob the publish job to process * * @see org.opencms.publish.CmsPublishManager#getPublishList(org.opencms.file.CmsObject, org.opencms.file.CmsResource, boolean) * @see org.opencms.publish.CmsPublishManager#getPublishList(org.opencms.file.CmsObject) */ protected CmsPublishThread(CmsPublishEngine publishEngine, CmsPublishJobInfoBean publishJob) { super(publishJob.getCmsObject(), Messages.get().getBundle().key(Messages.GUI_PUBLISH_TRHEAD_NAME_0)); m_publishJob = publishJob; m_publishEngine = publishEngine; // if the project to publish is a temporary project if (getCms().getRequestContext().getCurrentProject().getType() == CmsProject.PROJECT_TYPE_TEMPORARY) { // we have to update the user info after publishing m_updateSessionInfo = true; } else { m_updateSessionInfo = false; } try { m_jspLoader = (CmsJspLoader)OpenCms.getResourceManager().getLoader(CmsJspLoader.RESOURCE_LOADER_ID); } catch (ArrayIndexOutOfBoundsException e) { // ignore, loader not configured } }
CmsDbContext dbc = m_publishEngine.getDbContextFactory().getDbContext(getCms().getRequestContext()); try { CmsDbContext dbc = m_publishEngine.getDbContextFactory().getDbContext(getCms().getRequestContext()); try { m_publishEngine.getDriverManager().publishJob(getCms(), dbc, m_publishJob.getPublishList(), m_report); dbc = null; if (m_updateSessionInfo) { OpenCms.getSessionManager().updateSessionInfos(getCms());
CmsDbContext dbc = m_publishEngine.getDbContext(getCms().getRequestContext()); try {