Issue Details (XML | Word | Printable)

Key: SWF-210
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ben Hale
Reporter: Erwin Vervaet
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Spring Web Flow

Make "maxConversations" and "maxContinuations" properties easier to configure

Created: 05/Nov/06 01:57 AM   Updated: 11/Jan/07 02:11 AM   Resolved: 22/Dec/06 12:19 PM
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.0.1

Time Tracking:
Not Specified


 Description  « Hide
The SessionBindingConversationManager provides a "maxConversations" property. The ContinuationFlowExecutionRepository provides a "maxContinuations" property. Both are important to control SWF server-side resource usage. Both have a default value of -1 (unlimited).

Currently maxConversations and maxContinuations cannot be configured via the SWF config XSD. Furthermore, configuring maxContinuations is also very hard using classic Spring beans config since you can't use the FlowExecutorFactoryBean in that case.

The default values should also be revised, but this ofcourse has backwards compatibility impact. Better defaults would probably be:
maxConversations = 1
maxContinuations = 30

Erwin Vervaet added a comment - 05/Nov/06 02:49 AM

Erwin Vervaet added a comment - 11/Nov/06 01:05 PM
After some discussion we decided to change the default values for maxConversations and maxContinuations. The defaults are now:

maxConversations = 5
maxContinuations = 30

Although this is theoretically not backwards compatible, it is unlikely that this will effect any users in practice. The benefits of changing to these "conservative" defaults, mainly to avoid DoS attacks, outweighs the downside of the (theoretical) incompatibility.

Erwin Vervaet added a comment - 11/Nov/06 02:01 PM
I've added setMaxConversations and setMaxContinuations methods to FlowExecutorFactoryBean to allow easy configuration of those properties of the ConversationManager and ContinuationFlowExecutionRepository respectively.

Erwin Vervaet added a comment - 11/Nov/06 02:10 PM
Ben, we also need support for directly setting maxConversations and maxContinuations in the SWF config XSD. Can you add that?

Keith and I discussed this and we feel the config XML should look like this:

<flow:executor id="..." registry-ref="...">
  <flow:repository type="continuation" max-conversations="1" max-continuations="30" conversation-manager-ref="myManager"/>
</flow:executor>

So we have a new <flow:repository> sub-element of the <flow:executor> element. This element has 4 possible attributes:
1) type (mandatory) - same as repository-type attribute of <flow:executor> - if you specify a <flow:repository> element, it's illegal to use the repository-type attribute on the containing <flow:executor> elemnt - the repository-type attribute remains as is for convenient use when you don't want to configure the repository explicitly
2) max-conversations (optional) - maps to setMaxConversations in FlowExecutorFactoryBean - it's illegal to us this when you're also using conversation-manager-ref
3) max-continuations (optional) - maps to setMaxContinuations in FlowExecutorFactoryBean - only usefull when type==continuations
4) conversation-manager-ref (optional) - maps to setConversationManager in FlowExecutorFactoryBean

This also alligns the functionality of the FlowExecutorFactoryBean and the SWF config XSD.
If you have any question, let me know!

Ben Hale added a comment - 22/Dec/06 12:19 PM
Added tags and parsing in line with suggestions in this issue.