Use setAttribute to Change Session State:
In an HTTP servlet that implements javax.servlet.http.HttpSession, use HttpSession.setAttribute (which replaces the deprecated putValue) to change attributes in a session object. If you set attributes in a session object with setAttribute, the object and its attributes are replicated in a cluster using in-memory replication. If you use other set methods to change objects within a session, WebLogic Server does not replicate those changes. Every time a change is made to an object that is in the session, setAttribute() should be called to update that object across the cluster.
In an HTTP servlet that implements javax.servlet.http.HttpSession, use HttpSession.setAttribute (which replaces the deprecated putValue) to change attributes in a session object. If you set attributes in a session object with setAttribute, the object and its attributes are replicated in a cluster using in-memory replication. If you use other set methods to change objects within a session, WebLogic Server does not replicate those changes. Every time a change is made to an object that is in the session, setAttribute() should be called to update that object across the cluster.
在实现javax.servlet.http.HttpSession的HTTP servlet中,使用HttpSession.setAttribute()方法更改会话对象中的属性。若通过setAttribute设置会话对象中的属性,则该对象及其属性将通过内存复制的方式在集群中进行复制。若使用其他方法修改会话内的对象,WebLogic Server不会复制这些更改。每次更改位于会话中的对象时,都应调用setAttribute()以跨集群更新该对象。
2985

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



