【问题标题】:using Grails 2 Web Flow plugin for a shared nothing architecture [closed]使用 Grails 2 Web Flow 插件实现无共享架构 [关闭]
【发布时间】:2013-03-12 20:33:43
【问题描述】:

我将 grails 2.2 用于大型、非平凡的 Web 应用程序,采用“无共享”方法。我发现 Grails 插件 -> grails Web 流非常有用,但是我无法将会话状态存储在用户会话中。有没有办法将其存储在诸如 memcached 或 Coherence*Web 之类的外部存储中?

注意:shared nothing是指在Java EE web引擎的Http session中不存储任何信息,以避免在集群环境中复制session信息。

【问题讨论】:

    标签: grails persistence scalability grails-plugin spring-webflow-2


    【解决方案1】:

    Web Flow 插件提供了一个名为 conversionManager 的 bean,其定义如下:

    conversationManager(SessionBindingConversationManager)
    

    ConversationManager 接口的此默认实现将对话存储在会话中。您可以通过在 grails-app/conf/spring/resources.groovy 中定义一个同名的 bean 来将此实现替换为在其他地方(例如在 Coherence 中)存储对话的实现:

    conversationManager(CoherenceConversationManager)
    

    请注意,据我所知,“CoherenceConversationManager”不存在,您需要自己实现。

    【讨论】:

    • 谢谢 Graeme,我会尝试一下并用结果更新帖子。
    猜你喜欢
    • 2014-07-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-05
    • 1970-01-01
    • 2010-10-24
    • 2023-02-13
    相关资源
    最近更新 更多