@Override public Manager getManager() { return super.getManager(); }
@Override public Manager getManager() { return super.getManager(); }
@Override public Manager getManager() { return super.getManager(); }
/** * Set the distributable flag for this web application. * * @param distributable The new distributable flag */ public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", oldDistributable, this.distributable); // Bugzilla 32866 if( getManager() != null) { getManager().setDistributable(distributable); } }
/** * Set the distributable flag for this web application. * * @param distributable The new distributable flag */ public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", oldDistributable, this.distributable); // Bugzilla 32866 if( getManager() != null) { getManager().setDistributable(distributable); } }
/** * Starts the session manager of this Context. */ protected void managerStart() throws LifecycleException { if ((manager != null) && (manager instanceof Lifecycle)) { ((Lifecycle) getManager()).start(); } }
private Manager getManager(ServletContext servletContext) { try { ApplicationContextFacade acf = (ApplicationContextFacade) servletContext; Field applicationContextFacadeField = ApplicationContextFacade.class.getDeclaredField("context"); applicationContextFacadeField.setAccessible(true); ApplicationContext appContext = (ApplicationContext) applicationContextFacadeField.get(acf); Field applicationContextField = ApplicationContext.class.getDeclaredField("context"); applicationContextField.setAccessible(true); StandardContext stdContext = (StandardContext) applicationContextField.get(appContext); return stdContext.getManager(); } catch (Exception e) { // maybe not in Tomcat? LOG.error("Unable to get catalina manager. Cause: {}", e.getMessage(), e); throw new RuntimeException(e.getMessage(), e); } } }
/** * Set the distributable flag for this web application. * * @param distributable The new distributable flag */ public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", new Boolean(oldDistributable), new Boolean(this.distributable)); // Bugzilla 32866 if(getManager() != null) { if(log.isDebugEnabled()) { log.debug("Propagating distributable=" + distributable + " to manager"); } getManager().setDistributable(distributable); } }
ApplicationContextFacade appContextFacadeObj = (ApplicationContextFacade) request.getSession().getServletContext(); try { Field applicationContextField = appContextFacadeObj.getClass().getDeclaredField("context"); applicationContextField.setAccessible(true); ApplicationContext appContextObj = (ApplicationContext) applicationContextField.get(appContextFacadeObj); Field standardContextField = appContextObj.getClass().getDeclaredField("context"); standardContextField.setAccessible(true); StandardContext standardContextObj = (StandardContext) standardContextField.get(appContextObj); Manager persistenceManager = standardContextObj.getManager(); } catch(SecurityException e) { logger.error(e); } catch(NoSuchFieldException e) { logger.error(e); } catch(IllegalArgumentException e) { logger.error(e); } catch(IllegalAccessException e) { logger.error(e); }
/** * Set the distributable flag for this web application. * * @param distributable The new distributable flag */ @Override public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", Boolean.valueOf(oldDistributable), Boolean.valueOf(this.distributable)); // Bugzilla 32866 if(getManager() != null) { if(log.isLoggable(Level.FINE)) { log.log(Level.FINE, "Propagating distributable=" + distributable + " to manager"); } getManager().setDistributable(distributable); } }
/** * Destroys this context by cleaning it up completely. * * The problem is that undoing all the config in start() and restoring * a 'fresh' state is impossible. After stop()/destroy()/init()/start() * we should have the same state as if a fresh start was done - i.e * read modified web.xml, etc. This can only be done by completely * removing the context object and remapping a new one, or by cleaning * up everything. * * XXX Should this be done in stop() ? */ @Override public void destroy() throws Exception { super.destroy(); // START SJASAS 6359401 // super.destroy() will stop session manager and cause it to unload // all its active sessions into a file. Delete this file, because this // context is being destroyed and must not leave any traces. if (getManager() instanceof ManagerBase) { ((ManagerBase)getManager()).release(); } // END SJSAS 6359401 instanceListeners.clear(); instanceListenerInstances.clear(); }
/** * Set the distributable flag for this web application. * * @param distributable The new distributable flag */ @Override public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", oldDistributable, this.distributable); // Bugzilla 32866 if(getManager() != null) { if(log.isDebugEnabled()) { log.debug("Propagating distributable=" + distributable + " to manager"); } getManager().setDistributable(distributable); } }
/** * Set the distributable flag for this web application. * * @param distributable The new distributable flag */ @Override public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", oldDistributable, this.distributable); // Bugzilla 32866 if(getManager() != null) { if(log.isDebugEnabled()) { log.debug("Propagating distributable=" + distributable + " to manager"); } getManager().setDistributable(distributable); } }
/** * Set the distributable flag for this web application. * * @param distributable The new distributable flag */ @Override public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", oldDistributable, this.distributable); // Bugzilla 32866 if(getManager() != null) { if(log.isDebugEnabled()) { log.debug("Propagating distributable=" + distributable + " to manager"); } getManager().setDistributable(distributable); } }
/** * Set the distributable flag for this web application. * * @param distributable The new distributable flag */ @Override public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", oldDistributable, this.distributable); // Bugzilla 32866 if(getManager() != null) { if(log.isDebugEnabled()) { log.debug("Propagating distributable=" + distributable + " to manager"); } getManager().setDistributable(distributable); } }
/** * Set the distributable flag for this web application. * * @param distributable The new distributable flag */ @Override public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", oldDistributable, this.distributable); // Bugzilla 32866 if(getManager() != null) { if(log.isDebugEnabled()) { log.debug("Propagating distributable=" + distributable + " to manager"); } getManager().setDistributable(distributable); } }
/** * Set the distributable flag for this web application. * * @param distributable The new distributable flag */ @Override public void setDistributable(boolean distributable) { boolean oldDistributable = this.distributable; this.distributable = distributable; support.firePropertyChange("distributable", oldDistributable, this.distributable); // Bugzilla 32866 if(getManager() != null) { if(log.isDebugEnabled()) { log.debug("Propagating distributable=" + distributable + " to manager"); } getManager().setDistributable(distributable); } }
private void addPersistedSessionCookie(Request request, StandardContext ctx, Session sess) throws IOException { if (sess == null) { return; } Cookie cookie = ctx.getManager().toCookie(sess); if (cookie != null) { request.configureSessionCookie(cookie); grizzlyResponse.addHeader(SET_COOKIE_HEADER, response.getCookieString(cookie)); } }
Manager manager = getManager(); if (manager instanceof Lifecycle) { ((Lifecycle) manager).destroy();
Manager manager = getManager(); if (manager != null) { try {