to eyeieye(魔之眼) :呵呵,多谢!眼拙了。我也看过这个文件,但万万没想到它会自已生成自已。这样的设计不知有何道理?别外,我还得找找究竟在何处调用了ServiceLocatorImpl.sessionCreated();
查了资料:HttpSessionListener接口的sessionCreated方法:Notification that a session was created.而sessionDestroyed方法:Notification that a session was invalidated.ServiceLocatorImpl实现了HttpSessionListener接口,也就是说当有session被创建,ServiceLocatorImpl.sessionCreated方法就被调用。但总得有一个ServiceLocatorImpl的实例啊,不知此ServiceLocatorImpl的实例在哪里创建了?
我现在正研究其中的waf部分和ejb部分。扩展标签暂时没有时间看呢。我现有一问题:
pet store Version 1.3_01中的RequestProcessor.java中有一段代码:
ServiceLocator sl = (ServiceLocator)request.getSession().getAttribute(WebKeys.SERVICE_LOCATOR);
WebClientController wcc = sl.getWebClientController(); HTMLAction action = getAction(selectedURL);
if (action != null)
{
action.setServletContext(context);
action.doStart(request);
ev = action.perform(request);
EventResponse eventResponse = null;
if (ev != null)
{
eventResponse = wcc.handleEvent(ev);
}
action.doEnd(request, eventResponse);
}其中,request.getSession().getAttribute(WebKeys.SERVICE_LOCATOR),我不知道在哪里有request.setSession().setAttribute(WebKeys.SERVICE_LOCATOR,SomeObject).我想就是在这段代码里waf将event与ejb tier匹配,然后Execute EJB action。当然,由猜测可知session.getAttribute(WebKeys.WEB_CLIENT_CONTROLLER)应返回ServiceLocatorImpl的一个实例,但我就是找不到在程式的哪里有request.setSession().setAttribute(WebKeys.SERVICE_LOCATOR,SomeObject)?请大伙看看。
这个谢了
ServiceLocatorImpl.java,ShoppingClientServiceLocatorImpl.java内有
[email protected]另外,哪位兄弟能讲讲那些后缀是screen的文件是啥东东?