It is important to distinguish session state from cached state.
将会话状态与缓存的状态区分开很重要。
We can track the cached state of the client session by using a client cookie. Listing 1 puts it together
通过使用一个客户机 cookie,我们可以跟踪客户机会话的缓存状态。
Stateful components can be problematic in a web context because of managing cached state for example - many applications break when a rollback occurs because the state isn't tied to the transaction.
由于需要管理缓存着的状态,有状态的组件可能会在Web上下文中出现问题,比如,发生回滚时许多应用都会出问题,因为状态并没有和事务绑定起来。
应用推荐