public CustomSSManager() {
addScriptSessionListener(new ScriptSessionListener(){
public void sessionCreated(ScriptSessionEvent event) {
ScriptSession scriptSession = event.getSession(); // ��ȡ�´�����SS
HttpSession httpSession = WebContextFactory.get().getSession();// ��ȡ����SS���û���HttpSession
User user = (User)httpSession.getAttribute(SESSION_USER);
if(user ==null){
scriptSession.invalidate();
httpSession.invalidate();
return;
}
String ssId = (String) httpSession.getAttribute(SS_ID);
if (ssId != null) {
DefaultScriptSession old=sessionMap.get(ssId);
if(old!=null)CustomSSManager.this.invalidate(old);
}
httpSession.setAttribute(SS_ID, scriptSession.getId());
scriptSession.setAttribute("userId", user.getId());//�˴���userId��scriptSession��
}
public void sessionDestroyed(ScriptSessionEvent event) {}
});
ReqReverseAjax.manager=this;//���Լ���¶ReverseAjaxҵ������