无法从GemFire支持的会话中检索已保存的对象 [英] Not able to retrieve saved objects from GemFire backed session

查看:107
本文介绍了无法从GemFire支持的会话中检索已保存的对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用GemFire会话存储来保存和检索对象.

I was using the GemFire session store to save and retrieve objects.

session.getAttribute(sessionKey) and session.setAttribute(sessionKey, value)

但是,有时在保存后,当我尝试单击下一个按钮来检索对象时,我会得到一个null值.其他时候,它会正确检索该值.用于保存和检索的会话ID相同,但是仍检索到null.

But, sometimes after saving, when I am trying to retrieve the object on the next button click, I am getting a null value back. Other times it retrieves the value correctly. The session id used for saving and retrieving are same, but still null is retrieved.

我有什么办法可以查看针对特定密钥的保存在Geode的Pulse Monitoring应用程序(数据浏览器工具)中的数据?

Is there any way I could see the data that is saved in Geode's Pulse Monitoring application (Data Browser tool) for a particular key?

感谢您的帮助.

推荐答案

简短的回答,是的,您可以使用 Gfsh Pulse的 DataBrowser工具(扩展名)进行编写OQL查询,检查存储在相应Region中的会话对象状态.

Short answer, yes, you can either use Gfsh or Pulse's DataBrowser Tool (extension) to write OQL queries, inspecting the session objects state stored in the corresponding Region.

我写了几个OQL查询(可用

I have written several OQL queries (available here) allowing you to inspect an object stored in a Region, include a session object, containing session attributes, where the attribute values might refer to your application domain objects stored in the session by your application in a Spring Web MVC Controller, for instance.

这些OQL查询假定您使用的是 枢轴GemFire的Spring会话 来管理HTTP会话状态(即HttpSession),并使用Pivotal GemFire作为

These OQL queries assume you are using Spring Session for Pivotal GemFire to manage your HTTP session state (i.e. the HttpSession) along with using Pivotal GemFire as the data store provider for Spring Session.

如果您使用的是Pivotal GemFire的 HTTP会话管理模块,您将需要调整这些OQL查询.

If you are using Pivotal GemFire's HTTP Session Management Module instead, you will need to adjust these OQL queries.

最后,请注意,您可能需要将应用程序域对象类型(类)放在服务器的类路径上,因为某些OQL查询语句可能导致对存储的应用程序域对象类型进行反序列化.

Finally, be aware that you may possibly need to put your application domain object types (classes) on the servers classpath, since certain OQL query statement can cause your stored application domain object types to get deserialized.

此外,请查看Pivotal GemFires 有关查询的文档了解更多信息.

Also, review Pivotal GemFires documentation on querying for more details.

希望这会有所帮助!

这篇关于无法从GemFire支持的会话中检索已保存的对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆