Spring Web Flow
  1. Spring Web Flow
  2. SWF-1059

Possibility to configure the lockTimeoutSeconds on the ConversationManager

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0.5
    • Fix Version/s: None
    • Component/s: Core: Flow Executor
    • Labels:
      None

      Description

      While it is possible to set the maxConversations property on the FlowExecutor bean (which sets a property of the SessionBindingConversationManager) it is not possible to set the timeoutSeconds which configures the seconds it takes before the LockTimeoutException is thrown. So it would be nice to see something like below:

      <webflow:flow-executor id="flowExecutor">
      <webflow:flow-execution-repository max-executions="1" max-execution-snapshots="25" lock-timeout-seconds="15" />
      </webflow:flow-executor>

      The setting of the lock-timeout-seconds attribute will call the setter on the SessionBindingConversationManager in the createConversationManager-method of the FlowExecutorFactoryBean.

      With the current build it is only possible to do this programmatically.
      Thusly:
      SessionBindingConversationManager sbcm=(SessionBindingConversationManager)ExternalContextHolder.getExternalContext().getSessionMap().getAttribute("webflowConversationContainer");
      sbcm.setLockTimeoutSeconds(15);

        Activity

        Hide
        Alex Marshall added a comment -

        Is there any kind of timeline on a fix for this ? The system I'm working on unfortunately has some long operations that we've been unable to shorten and increasing the lock timeout would be a great help.

        Show
        Alex Marshall added a comment - Is there any kind of timeline on a fix for this ? The system I'm working on unfortunately has some long operations that we've been unable to shorten and increasing the lock timeout would be a great help.
        Hide
        Mohan added a comment -

        Hey Keith,

        Can you take it as major issue. I tried programmatically but it did not work.

        Show
        Mohan added a comment - Hey Keith, Can you take it as major issue. I tried programmatically but it did not work.
        Hide
        Lubor Vágenknecht added a comment -

        This solution sets lock time-out in the SessionBindingConversationManager during start-up of application. I hope, the setting will be adjustable in the next release of Spring WebFlow.

        <flow:flow-executor id="flowExecutor" ...>
        ...
        </flow:flow-executor>

        <bean id="webFlowHelper" class="WebFlowHelper">
        <constructor-arg index="0" ref="flowExecutor"/>
        <property name="lockTimeoutSeconds" value="80"/>
        </bean>

        public class WebFlowHelper {

        private FlowExecutor flowExecutor;

        public WebFlowHelper(FlowExecutor flowExecutor)

        { this.flowExecutor = flowExecutor; }

        public FlowExecutor getFlowExecutor()

        { return flowExecutor; }

        public SessionBindingConversationManager getConversationManager()

        { return ((SessionBindingConversationManager) ((DefaultFlowExecutionRepository) ((FlowExecutorImpl) flowExecutor).getExecutionRepository()). getConversationManager()); }

        public int getLockTimeoutSeconds()

        { return getConversationManager().getLockTimeoutSeconds(); }

        public void setLockTimeoutSeconds(int lockTimeoutSeconds)

        { getConversationManager().setLockTimeoutSeconds(lockTimeoutSeconds); }

        }

        Show
        Lubor Vágenknecht added a comment - This solution sets lock time-out in the SessionBindingConversationManager during start-up of application. I hope, the setting will be adjustable in the next release of Spring WebFlow. <flow:flow-executor id="flowExecutor" ...> ... </flow:flow-executor> <bean id="webFlowHelper" class="WebFlowHelper"> <constructor-arg index="0" ref="flowExecutor"/> <property name="lockTimeoutSeconds" value="80"/> </bean> public class WebFlowHelper { private FlowExecutor flowExecutor; public WebFlowHelper(FlowExecutor flowExecutor) { this.flowExecutor = flowExecutor; } public FlowExecutor getFlowExecutor() { return flowExecutor; } public SessionBindingConversationManager getConversationManager() { return ((SessionBindingConversationManager) ((DefaultFlowExecutionRepository) ((FlowExecutorImpl) flowExecutor).getExecutionRepository()). getConversationManager()); } public int getLockTimeoutSeconds() { return getConversationManager().getLockTimeoutSeconds(); } public void setLockTimeoutSeconds(int lockTimeoutSeconds) { getConversationManager().setLockTimeoutSeconds(lockTimeoutSeconds); } }
        Hide
        Lisa DeSouza added a comment -

        I would think this should have been marked as an urgent issue. Still no hope??

        Show
        Lisa DeSouza added a comment - I would think this should have been marked as an urgent issue. Still no hope??

          People

          • Assignee:
            Keith Donald
            Reporter:
            Jan Lievens
          • Votes:
            16 Vote for this issue
            Watchers:
            15 Start watching this issue

            Dates

            • Created:
              Updated:

              Development