[ https://issues.apache.org/jira/browse/DIRMINA-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590445#comment-12590445 ]
Emmanuel Lecharny edited comment on DIRMINA-572 at 9/10/14 11:05 AM: --------------------------------------------------------------------- Currently, to configure the mina statemachine using spring one of the ways of doing this is to declare the following in your applicationContext.xml file. This is an *example*. Please note that the referenced factorybeans classes are included as attachment. :::code <bean id="passwordProtectionStateMachine" class="filter.passwordprotection.StateMachineFactoryBean"> <property name="startState"> <util:constant static-field="filter.passwordprotection.PasswordProtection.PASSWORD_AUTHENTICATION" /> </property> <property name="stateMachineImpl"> <bean class="filter.passwordprotection.PasswordProtection" /> </property> <property name="transitionAnnotation" value="org.apache.mina.statemachine.annotation.IoFilterTransition" /> </bean> <bean id="passwordProtectionIoFilterStateMachine" class="filter.passwordprotection.IoFilterStateMachineProxyFactoryBean"> <property name="ignoreStateContextLookupFailure" value="true" /> <property name="ignoreUnhandledEvents" value="true" /> <property name="stateContextLookup" ref="ioSessionStateContextLookup" /> <property name="stateMachine" ref="passwordProtectionStateMachine" /> </bean> <bean id="ioSessionStateContextLookup" class="org.apache.mina.statemachine.context.IoSessionStateContextLookup"> <constructor-arg index="0"> <bean class="filter.passwordprotection.PasswordProtectionStateContextFactory" /> </constructor-arg> <constructor-arg index="1" value="passwordProtectionContext" /> </bean> was (Author: simontrudeau): Currently, to configure the mina statemachine using spring one of the ways of doing this is to declare the following in your applicationContext.xml file. This is an *example*. Please note that the referenced factorybeans classes are included as attachment. <bean id="passwordProtectionStateMachine" class="filter.passwordprotection.StateMachineFactoryBean"> <property name="startState"> <util:constant static-field="filter.passwordprotection.PasswordProtection.PASSWORD_AUTHENTICATION" /> </property> <property name="stateMachineImpl"> <bean class="filter.passwordprotection.PasswordProtection" /> </property> <property name="transitionAnnotation" value="org.apache.mina.statemachine.annotation.IoFilterTransition" /> </bean> <bean id="passwordProtectionIoFilterStateMachine" class="filter.passwordprotection.IoFilterStateMachineProxyFactoryBean"> <property name="ignoreStateContextLookupFailure" value="true" /> <property name="ignoreUnhandledEvents" value="true" /> <property name="stateContextLookup" ref="ioSessionStateContextLookup" /> <property name="stateMachine" ref="passwordProtectionStateMachine" /> </bean> <bean id="ioSessionStateContextLookup" class="org.apache.mina.statemachine.context.IoSessionStateContextLookup"> <constructor-arg index="0"> <bean class="filter.passwordprotection.PasswordProtectionStateContextFactory" /> </constructor-arg> <constructor-arg index="1" value="passwordProtectionContext" /> </bean> > Add Spring support for Mina statemachine > ---------------------------------------- > > Key: DIRMINA-572 > URL: https://issues.apache.org/jira/browse/DIRMINA-572 > Project: MINA > Issue Type: Improvement > Components: Statemachine > Environment: All environment > Reporter: simon trudeau > Fix For: 2.0.8 > > Attachments: IoFilterStateMachineProxyFactoryBean.java, > PasswordProtectionStateContextFactory.java, StateMachineFactoryBean.java > > > Currently, the configuring the Mina statemachine using Spring is not a > trivial process. The API should be improved to provide convience classes and > methods to allow for easier Spring 2.x configuration. -- This message was sent by Atlassian JIRA (v6.3.4#6332)