[ 
https://issues.apache.org/jira/browse/DIRMINA-572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

simon trudeau updated DIRMINA-572:
----------------------------------


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
>
> 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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to