Announcement Announcement Module
No announcement yet.
Session Replication Optimized WebFlow Conversation Manager Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Session Replication Optimized WebFlow Conversation Manager

    Weblogic as well as other application servers, do session replication on session.setAttribute(). Since ALL of the webflow conversations are in the same attribute, ALL of the conversations get replicated each time a post/get cycle is performed. This means that lots of data is moved that wasn't tied to the 'current' conversation...particularly if you are using the continuation flow executor.

    I fixed this by giving each conversation it's own slot in the session, thereby limiting replication to the conversation that was just executed. For long conversations and/or conversations that may have lots of data in them (search results?), this cuts down heavily on the network traffic without affecting anything else about how webflow works.

    I attached the 3 required files to this post. The code was partially copied from the default setup in spring web flow 1.0. Also, I included some java 1.5 stuff so those still using java 1.4 will need to tweak some.

    The entry in your webflow-config.xml should be:

        <!-- the schema based declaration -->
        <flow:executor id="flowExecutor"  registry-ref="flowRegistry">
        	<flow:repository type="continuation" conversation-manager-ref="conversationManager"/>
        		<flow:listener ref="flowExecutionListener"/>
        <bean id="conversationManager" class="my.spring.webflow.ReplicationOptimizedSessionBindingConversationManager"/>