JSF-1.2-问题。重定向到外部服务时保存当前应用程序状态(托管 bean 状态)的策略
定义——
- 在某个时刻存在具有托管 bean 状态的工作 Web 应用程序。
- 此网络应用程序向外部应用程序发送请求
外部应用程序回调(http 'get' 方法)到网络应用程序
-- 此时应用程序应将托管 bean 状态恢复为向外部应用程序发出请求之前的状态。
-- 注意: 外部应用程序的响应时间可能晚于 Web 应用程序会话持续时间的最后一次。
问题 -- JSF 中是否有解决此类问题的模式或技术?
你处理这样的问题的方法是什么?
Definition --
- There is working web-app with managed-bean state at some point.
- this web-app posts request to external-application
External-application calls-back(http 'get' method) to web-app
-- At this time application should restore managed-bean state as it was before request to external application.
-- Note: External-app may respond later, than web-app session duration last.
Question --
If there are patterns or techniques around this kind of problem in JSF?
What is your way dealing with problem like this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将状态与唯一键一起存储在会话范围中,并将该键作为请求参数或回调 URL 中的路径信息包含在内。当收到回调请求时,从请求参数或pathinfo中提取key,然后根据该key从session中获取状态。
Store the state in the session scope along with an unique key and include that key as request parameter or pathinfo in the callback URL. When the callback request is received, extract the key from the request parameter or pathinfo and then obtain the state from the session based on that key.