Pergunta

I am using grails 2.2 for a large, non trivial web application, with “shared nothing” approach. I find Grails plugin -> grails Web flows very useful , however I cannot store the conversation state in the user session. Is there a way to store this in external storage such as memcached or Coherence*Web?

Note: shared nothing means not storing any information in Http session of a Java EE web engine, so as to avoid need for replication of session information in a clustered environment.

Foi útil?

Solução

The Web Flow plugin provides a bean called conversionManager which is defined like:

conversationManager(SessionBindingConversationManager)

This default implementation of the ConversationManager interface stores conversations in the session. You can replace this implementation with one that stores conversations elsewhere (such as in Coherence) by defining a bean of the same name in grails-app/conf/spring/resources.groovy:

conversationManager(CoherenceConversationManager)

Note that "CoherenceConversationManager" doesn't exist as far as I know, you would need to implement this yourself.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top