Examples of SessionIocContext


Examples of org.nutz.mvc.ioc.SessionIocContext

        /*
         * 如果 Ioc 容器实现了高级接口,那么会为当前请求设置上下文对象
         */
        if (ioc instanceof Ioc2) {
          reqContext = new RequestIocContext(ac.getRequest());
          SessionIocContext sessionContext = new SessionIocContext(ac.getRequest()
                                        .getSession());
          IocContext myContext = new ComboContext(reqContext, sessionContext);
          obj = ((Ioc2) ioc).get(moduleType, injectName, myContext);
        }
        /*
 
View Full Code Here

Examples of org.nutz.mvc.ioc.SessionIocContext

   * @param session
   *            HTTP 会话对象
   */
  public static void deposeSession(HttpSession session) {
    if (session != null)
      new SessionIocContext(session).depose();
  }
View Full Code Here

Examples of org.nutz.mvc.ioc.SessionIocContext

                /*
                 * 如果 Ioc 容器实现了高级接口,那么会为当前请求设置上下文对象
                 */
                if (ioc instanceof Ioc2) {
                    reqContext = new RequestIocContext(ac.getRequest());
                    SessionIocContext sessionContext = new SessionIocContext(Mvcs.getHttpSession());
                    IocContext myContext = new ComboContext(reqContext, sessionContext);
                    Mvcs.setIocContext(myContext);
                    obj = ((Ioc2) ioc).get(moduleType, injectName, myContext);
                }
                /*
 
View Full Code Here

Examples of org.nutz.mvc.ioc.SessionIocContext

     * @param session
     *            HTTP 会话对象
     */
    public static void deposeSession(HttpSession session) {
        if (session != null)
            new SessionIocContext(session).depose();
    }
View Full Code Here

Examples of org.nutz.mvc.ioc.SessionIocContext

     * @param session
     *            HTTP 会话对象
     */
    public static void deposeSession(HttpSession session) {
        if (session != null)
            new SessionIocContext(session).depose();
    }
View Full Code Here

Examples of org.nutz.mvc.ioc.SessionIocContext

                    reqContext = new RequestIocContext(ac.getRequest());
                    HttpSession sess = Mvcs.getHttpSession(false);
                    IocContext myContext = null;
                    // 如果容器可以创建 Session ...
                    if (null != sess) {
                        SessionIocContext sessionContext = new SessionIocContext(sess);
                        myContext = new ComboContext(reqContext, sessionContext);
                    }
                    // 如果容器禁止了 Session ...
                    else {
                        myContext = reqContext;
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.