Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOContext.contextID()


   */
  @Override
  public void savePage(WOComponent page) {
    WOContext context = context();
    if (ERXAjaxApplication.shouldNotStorePage(context)) {
      if (logger.isDebugEnabled()) logger.debug("Considering pageReplacementCache for " + context.request().uri() + " with contextID " + context.contextID());
      WORequest request = context.request();
      WOResponse response = context.response();
      String pageCacheKey = null;
      if (response != null) {
        pageCacheKey = response.headerForKey(ERXAjaxSession.PAGE_REPLACEMENT_CACHE_LOOKUP_KEY);
View Full Code Here


          entryIterator.remove();
          if (logger.isDebugEnabled()) logger.debug(pageCacheKey + "pageReplacementCache too large, removing oldest entry = " + ((TransactionRecord)oldestEntry.getValue()).key());
        }

        TransactionRecord pageRecord = new TransactionRecord(page, context, pageCacheKey);
        pageReplacementCache.put(context.contextID(), pageRecord);
        if (logger.isDebugEnabled()) logger.debug(pageCacheKey + " new context = " + context.contextID());
        if (logger.isDebugEnabled()) logger.debug(pageCacheKey + " = " + pageReplacementCache.keySet());

        ERXAjaxApplication.cleanUpHeaders(response);
      }
View Full Code Here

          if (logger.isDebugEnabled()) logger.debug(pageCacheKey + "pageReplacementCache too large, removing oldest entry = " + ((TransactionRecord)oldestEntry.getValue()).key());
        }

        TransactionRecord pageRecord = new TransactionRecord(page, context, pageCacheKey);
        pageReplacementCache.put(context.contextID(), pageRecord);
        if (logger.isDebugEnabled()) logger.debug(pageCacheKey + " new context = " + context.contextID());
        if (logger.isDebugEnabled()) logger.debug(pageCacheKey + " = " + pageReplacementCache.keySet());

        ERXAjaxApplication.cleanUpHeaders(response);
      }
      else {
View Full Code Here

          // A null pageCacheKey should mean an Ajax request that is not returning a content update or an expliclty not cached non-Ajax request
        if (logger.isDebugEnabled()) logger.debug("Not caching as no pageCacheKey found");
      }
    }
    else {
      if (logger.isDebugEnabled()) logger.debug("Calling super.savePage for contextID " + context.contextID());
      super.savePage(page);
    }
  }

  /**
 
View Full Code Here

  // not sure how, though
    @Override
  public void savePageInPermanentCache(WOComponent wocomponent) {
    if(overridePrivateCache) {
      WOContext wocontext = context();
      String contextID = wocontext.contextID();
      if (logger.isDebugEnabled()) logger.debug("Saving page for contextID: " + contextID);
      NSMutableDictionary permanentPageCache = _permanentPageCache();
      for (int i = WOApplication.application().permanentPageCacheSize(); _permanentContextIDArray.count() >= i; _permanentContextIDArray.removeObjectAtIndex(0)) {
        String s1 = (String) _permanentContextIDArray.objectAtIndex(0);
        WOComponent page = (WOComponent) permanentPageCache.removeObjectForKey(s1);
View Full Code Here

          if(url.indexOf(sessionIdKey + "=") < 0) {
              url = url + argsChar + sessionIdKey + "=" +sessionID;
              argsChar = "&";
          }
          if(url.indexOf("wocid=") < 0) {
              url = url + argsChar + "wocid=" + context.contextID();
          }
        }
        redirectionResponse = WOApplication.application().createResponseInContext(context);
        redirectionResponse.setHeader(url, "location");
        redirectionResponse.setStatus(302);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.