服务器:jboss4.2
问题:偶尔两个帐号在两台不同的机器上,a帐户获取了b帐号的session值
[code]public ActionForward loadDialogList4Inbox(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)throws Exception{
MailService service = (MailService)this.getBean("mailService");
List labels = (List)request.getSession().getAttribute("labels");
if(labels == null){
labels = service.loadLabelWithTotal(this.getUserId());
request.getSession().setAttribute("labels",labels);
}
return mapping.findForward("dialogList");
}[/code]
问题:偶尔两个帐号在两台不同的机器上,a帐户获取了b帐号的session值
[code]public ActionForward loadDialogList4Inbox(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)throws Exception{
MailService service = (MailService)this.getBean("mailService");
List labels = (List)request.getSession().getAttribute("labels");
if(labels == null){
labels = service.loadLabelWithTotal(this.getUserId());
request.getSession().setAttribute("labels",labels);
}
return mapping.findForward("dialogList");
}[/code]
本文探讨了在JBoss4.2环境下遇到的一个奇怪现象:不同机器上的两个账号偶尔会互相获取到对方的session值。通过分析代码,提供了一段具体的业务逻辑实现,旨在寻找可能的原因及解决方案。
2195

被折叠的 条评论
为什么被折叠?



