Read the following article:
http://www.infoq.com/articles/spring...low-terracotta
That made me change my mind about how I was thinking of it. We have "sticky" sessions and it appeared that was a good solution for us. I have since talked to my team lead and he doesn't think its an option...due to various reasons (mostly political)
we will not be able to use it. We have already implemented a lot of the code for sending information to the server that would allow whatever server it fails over to to load up the correct user information.
My original thought was to add a hidden input field with this information but if it is possible I would like to add it to the flowExecutionKey like this:
_flowExecutionKey=_cD934FA66-05F4-251E-ECCE-EB300DFAB701_kFD8F4B84-81BC-3023-6CF0-92D3EE78E77C_uMY-USER-INFORMATION-HERE
What I have come up with so far:
I have extended RequestParameterFlowExecutorArgumentHandler and called my class MyNewFlowExecutorArgumentHandler
Code:
<bean name="/ownerinformation.htm" class="org.springframework.webflow.executor.mvc.FlowController">
<property name="flowExecutor" ref="flowExecutor"/>
<property name="argumentHandler">
<bean class="com.xactsites.producty.web.MyNewFlowExecutorArgumentHandler" />
</property>
</bean>
I am currently thinking of overriding the following two methods in the class like so:
Code:
@Override
public String createFlowExecutionUrl(String flowExecutionKey, FlowExecutionContext flowExecution,
ExternalContext context) {
StringBuffer url = new StringBuffer();
appendFlowExecutorPath(url, context);
url.append('?');
appendQueryParameter(url, getFlowExecutionKeyArgumentName(), flowExecutionKey + _uMY-USER-INFORMATION-HERE);
return url.toString();
}
@Override
public String extractFlowExecutionKey(ExternalContext context) throws FlowExecutorArgumentExtractionException {
String encodedKey = context.getRequestParameterMap().get(getFlowExecutionKeyArgumentName());
// Parse off the user information here...
if (!StringUtils.hasText(encodedKey)) {
throw new FlowExecutorArgumentExtractionException(
"Unable to extract the flow execution key parameter: make sure the client provides the '"
+ getFlowExecutionKeyArgumentName()
+ "' parameter as input; the parameters provided in this request are: "
+ StylerUtils.style(context.getRequestParameterMap()));
}
return encodedKey;
}
Pretty ugly eh? There has got to be a more elegant solution...right? Anybody have any ideas?