use of org.springframework.webflow.conversation.impl.SessionBindingConversationManager in project cas by apereo.
the class CasWebflowContextConfiguration method flowExecutorViaServerSessionBindingExecution.
@Bean
public FlowExecutor flowExecutorViaServerSessionBindingExecution() {
final FlowDefinitionRegistry loginFlowRegistry = loginFlowRegistry();
final SessionBindingConversationManager conversationManager = new SessionBindingConversationManager();
conversationManager.setLockTimeoutSeconds(Long.valueOf(casProperties.getWebflow().getSession().getLockTimeout()).intValue());
conversationManager.setMaxConversations(casProperties.getWebflow().getSession().getMaxConversations());
final FlowExecutionImplFactory executionFactory = new FlowExecutionImplFactory();
final SerializedFlowExecutionSnapshotFactory flowExecutionSnapshotFactory = new SerializedFlowExecutionSnapshotFactory(executionFactory, loginFlowRegistry);
flowExecutionSnapshotFactory.setCompress(casProperties.getWebflow().getSession().isCompress());
final DefaultFlowExecutionRepository repository = new DefaultFlowExecutionRepository(conversationManager, flowExecutionSnapshotFactory);
executionFactory.setExecutionKeyFactory(repository);
return new FlowExecutorImpl(loginFlowRegistry, executionFactory, repository);
}
use of org.springframework.webflow.conversation.impl.SessionBindingConversationManager in project cas by apereo.
the class WebflowExecutorFactory method buildFlowExecutorViaServerSessionBindingExecution.
private FlowExecutor buildFlowExecutorViaServerSessionBindingExecution() {
val conversationManager = new SessionBindingConversationManager();
val session = webflowProperties.getSession();
conversationManager.setLockTimeoutSeconds((int) Beans.newDuration(session.getLockTimeout()).getSeconds());
conversationManager.setMaxConversations(session.getMaxConversations());
val executionFactory = new FlowExecutionImplFactory();
executionFactory.setExecutionListenerLoader(new StaticFlowExecutionListenerLoader(executionListeners));
val flowExecutionSnapshotFactory = new SerializedFlowExecutionSnapshotFactory(executionFactory, this.flowDefinitionRegistry);
flowExecutionSnapshotFactory.setCompress(session.isCompress());
val repository = new DefaultFlowExecutionRepository(conversationManager, flowExecutionSnapshotFactory);
executionFactory.setExecutionKeyFactory(repository);
return new FlowExecutorImpl(this.flowDefinitionRegistry, executionFactory, repository);
}
Aggregations