/** * Public no argument constructor must be available. */ public ReIndexJob () { // Save to avoid global scope access m_aSC = WebScopeManager.getGlobalScope ().getServletContext (); }
public WebScoped () { this (new OfflineHttpServletRequest (WebScopeManager.getGlobalScope ().getServletContext (), false)); }
for (final ServletRegistration aRegistration : aGlobalScope.getServletContext () .getServletRegistrations () .values ())
/** * @return The dummy HTTP request to be used for executing this job. By * default an {@link OfflineHttpServletRequest} is created. */ @Nonnull @OverrideOnDemand protected MockHttpServletRequest createMockHttpServletRequest () { // Don't use "MockServletContext" to avoid that the global Servlet Context // Path is overriden! final OfflineHttpServletRequest ret = new OfflineHttpServletRequest (WebScopeManager.getGlobalScope () .getServletContext (), false); // Use a fixed session ID, because Quartz jobs regularly use the session and // this avoids spanning too many sessions ret.setSessionID ("quartz.job." + ClassHelper.getClassLocalName (getClass ())); return ret; }
public void run () { // Global scope may not be present here (on shutdown) final IGlobalWebScope aGlobalScope = WebScopeManager.getGlobalScopeOrNull (); if (aGlobalScope != null) try ( final WebScoped aWebScoped = new WebScoped (new OfflineHttpServletRequest (aGlobalScope.getServletContext (), false))) { // Check for long running requests m_aRequestTrackingMgr.checkForLongRunningRequests (s_aLongRunningCallbacks); } catch (final Exception ex) { LOGGER.error ("Error checking for long running requests", ex); } } }
aNodeList.addChild (aToolbar); final ServletContext aSC = WebScopeManager.getGlobalScope ().getServletContext ();
aNodeList.addChild (aToolbar); final ServletContext aSC = WebScopeManager.getGlobalScope ().getServletContext ();