Examples of ComboContext


Examples of org.nutz.ioc.impl.ComboContext

         */
        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.ioc.impl.ComboContext

                 * 如果 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.ioc.impl.ComboContext

                    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.