Package com.webobjects.appserver

Examples of com.webobjects.appserver.WOSession.sessionID()


  protected ERXRestTransaction transaction(WOContext context, WORequest request, ERXRestTransactionManager transactionManager) {
    WOSession session = context.session();

    String clientID = clientID(request);
    if (clientID == null) {
      clientID = session.sessionID();
    }

    return transactionManager.transactionForID(clientID);
  }
}
View Full Code Here


     * if not it assigns a EOObjectStoreCoordinator to the session.
     * @param n {@link WOSession#SessionDidCreateNotification}
     */
    public void sessionDidCreate(NSNotification n) {
        WOSession s = (WOSession) n.object();
        if (_oscForSession.get(s.sessionID()) == null) {
            _oscForSession.put(s.sessionID(), currentThreadObjectStore());
        }
    }
   
    /** Removes the timed out session from the internal array.
View Full Code Here

     * @param n {@link WOSession#SessionDidCreateNotification}
     */
    public void sessionDidCreate(NSNotification n) {
        WOSession s = (WOSession) n.object();
        if (_oscForSession.get(s.sessionID()) == null) {
            _oscForSession.put(s.sessionID(), currentThreadObjectStore());
        }
    }
   
    /** Removes the timed out session from the internal array.
     * session.
 
View Full Code Here

        StringBuilder requestHandlerPath = new StringBuilder();
        if (WOApplication.application().pageCacheSize() == 0) {
          if (aSession.storesIDsInURLs()) {
            requestHandlerPath.append(component.name());
            requestHandlerPath.append('/');
            requestHandlerPath.append(aSession.sessionID());
            requestHandlerPath.append('/');
            requestHandlerPath.append(aContextId);
            requestHandlerPath.append(".0");
          }
          else {
View Full Code Here

            requestHandlerPath.append(aContextId);
            requestHandlerPath.append(".0");
          }
        }
        else if (aSession.storesIDsInURLs()) {
          requestHandlerPath.append(aSession.sessionID());
          requestHandlerPath.append('/');
          requestHandlerPath.append(aContextId);
          requestHandlerPath.append(".0");
        }
        else {
View Full Code Here

  @Override
  public void saveSessionForContext(WOContext context) {
    WOSession session = context.session();
    EOEditingContext ec = ERXEC.newEditingContext();
    ERSessionInfo info = ERSessionInfo.clazz.objectMatchingKeyAndValue(ec, ERSessionInfo.SESSION_ID_KEY, session.sessionID());
    if(info == null) {
      info = ERSessionInfo.clazz.createAndInsertObject(ec);
      info.setSessionID(session.sessionID());
    }
    NSTimestamp expires = new NSTimestamp(System.currentTimeMillis() + session.timeOutMillis());
View Full Code Here

    WOSession session = context.session();
    EOEditingContext ec = ERXEC.newEditingContext();
    ERSessionInfo info = ERSessionInfo.clazz.objectMatchingKeyAndValue(ec, ERSessionInfo.SESSION_ID_KEY, session.sessionID());
    if(info == null) {
      info = ERSessionInfo.clazz.createAndInsertObject(ec);
      info.setSessionID(session.sessionID());
    }
    NSTimestamp expires = new NSTimestamp(System.currentTimeMillis() + session.timeOutMillis());
    info.setExpirationDate(expires);
    try {
      /*
 
View Full Code Here

      /*
       * If the session info is new, just don't save it.
       * Otherwise, we need to delete the session.
       */
      if(!info.isNewObject()) {
        removeSessionWithID(session.sessionID());
      }
      return;
    }
    ec.saveChanges();
  }
View Full Code Here

  public void sessionDidCreate(NSNotification notification) {
    WOSession session = (WOSession) notification.object();
    WORequest request = session.context().request();
    Conversation conversation = InstantMessengerAdaptor.conversation(request);
    if (conversation != null) {
      conversation.setSessionID(session.sessionID());
    }
  }

  public void sendMessage(String screenName, String buddyName, String message, boolean block) throws MessageException {
    if (_centralizeScreenName != null) {
View Full Code Here

  /** Overridden to check the sessions */
  @Override
  public WOSession createSessionForRequest(WORequest worequest) {
    WOSession wosession = super.createSessionForRequest(worequest);
    if (wosession != null && useSessionStoreDeadlockDetection()) {
      _sessions.put(wosession.sessionID(), new SessionInfo(null));
    }
    return wosession;
  }

  /** Overridden to check the sessions */
 
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.