Message-ID: <422837497.16969.1711616223785.JavaMail.root@ovh3sttqfj1> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_16968_48133681.1711616223785" ------=_Part_16968_48133681.1711616223785 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Example - Barry Kaplan

Example - Barry Kaplan

This was an approach prototyped by Barry Kaplan almost a year ago.

=20

Top level application configuration follows. Some notable features:

= =20 =20
=20
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframe=
work.org/dtd/spring-beans.dtd">

<beans>

    <!-- Sets up core Spring objects for QFJ -->
    <import resource=3D"classpath:quickfix/spring/quickfixj.appctx.xml"/=
>

    <bean id=3D"messageStoreFactory" class=3D"quickfix.spring.messagesto=
re.MemoryMessageStoreFactory"/>

    <bean id=3D"logFactory" class=3D"quickfix.ScreenLogFactory">
        <constructor-arg value=3D"true"/>
        <constructor-arg value=3D"true"/>
        <constructor-arg value=3D"true"/>
    </bean>

    <bean id=3D"dataDictionary" class=3D"quickfix.spring.session.DataDic=
tionary">
        <property name=3D"definition" ref=3D"quickfix:FIX42"/>
        <property name=3D"validateFieldsOutOfOrder" value=3D"false"/>
        <property name=3D"validateFieldsHaveValues" value=3D"false"/>
        <property name=3D"validateUserDefinedFields" value=3D"false"/>=
;
    </bean>

    <bean id=3D"abstractInitiatorSession" abstract=3D"true"
        class=3D"quickfix.spring.session.InitiatorSessionFactoryBean">
        <property name=3D"dataDictionary" ref=3D"dataDictionary"/>
        <property name=3D"sessionSchedule" value=3D"00:00:00, 24:00:00"/=
>
        <property name=3D"heartbeatInterval" value=3D"3"/>
        <property name=3D"messageStoreFactory" ref=3D"messageStoreFactor=
y"/>
        <property name=3D"logFactory" ref=3D"logFactory"/>
    </bean>

    <!-- Sessions are configured directly in the Spring configuration --=
>
    <!-- There is no use of the standard QF configuration file -->
    <!-- Every session can be configured with a different application ob=
ject, unlike QF -->

    <bean id=3D"initiatorSession_A" parent=3D"abstractInitiatorSession"&=
gt;
        <property name=3D"sessionID" value=3D"FIX.4.2:senderCompIdA:targ=
etCompIdA"/>
        <property name=3D"application">
            <bean class=3D"quickfix.spring.transport.ConfigurationServer=
$LoggingApplication">
                <property name=3D"name" value=3D"InitiatorA"/>
            </bean>
        </property>
    </bean>

    <bean id=3D"initiatorSession_B" parent=3D"abstractInitiatorSession"&=
gt;
        <property name=3D"sessionID" value=3D"FIX.4.2:senderCompIdB:targ=
etCompIdA"/>
        <property name=3D"application">
            <bean class=3D"quickfix.spring.transport.ConfigurationServer=
$LoggingApplication">
                <property name=3D"name" value=3D"InitiatorB"/>
            </bean>
        </property>
    </bean>

    <!--  -->

    <bean id=3D"abstractAcceptor" abstract=3D"true" class=3D"quickfix.sp=
ring.session.AcceptorSessionFactoryBean">
        <property name=3D"application">
            <bean class=3D"quickfix.spring.transport.ConfigurationServer=
$LoggingApplication">
                <property name=3D"name" value=3D"Acceptor"/>
            </bean>
        </property>
        <property name=3D"dataDictionary" ref=3D"dataDictionary"/>
        <property name=3D"sessionSchedule" value=3D"monday 00:00:00, sun=
day 24:00:00"/>
        <property name=3D"messageStoreFactory" ref=3D"messageStoreFactor=
y"/>
        <property name=3D"logFactory" ref=3D"logFactory"/>
    </bean>

    <bean id=3D"acceptorSession_A" parent=3D"abstractAcceptor">
        <property name=3D"sessionID" value=3D"FIX.4.2:targetCompIdA:send=
erCompIdA"/>
    </bean>

    <bean id=3D"acceptorSession_B" parent=3D"abstractAcceptor">
        <property name=3D"sessionID" value=3D"FIX.4.2:targetCompIdA:send=
erCompIdB"/>
    </bean>

</beans>
=20
=20

This is a mix-in style configuration for the network connections. By inc= luding a different file, a completely different transport could be used.=20

=20
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframe=
work.org/dtd/spring-beans.dtd">

<beans>

    <bean id=3D"quickfix:minaSocketInitiator" class=3D"quickfix.transpor=
t.mina.MinaSocketInitiator">
        <constructor-arg index=3D"0" ref=3D"quickfix:scheduledExecutorSe=
rvice"/>
    </bean>

    <bean id=3D"quickfix:minaSocketInitiatorAwareProcessor"
        class=3D"quickfix.spring.transport.mina.MinaSocketInitiatorAwarePro=
cessor">
        <property name=3D"minaInitiator" ref=3D"quickfix:minaSocketIniti=
ator"/>
    </bean>


    <bean id=3D"quickfix:minaSocketAcceptor" class=3D"quickfix.transport=
.mina.MinaSocketAcceptor"/>

    <bean id=3D"quickfix:minaSocketAcceptorAwareProcessor"
        class=3D"quickfix.spring.transport.mina.MinaSocketAcceptorAwareProc=
essor">
        <property name=3D"minaAcceptor" ref=3D"quickfix:minaSocketAccept=
or"/>
    </bean>

</beans>
=20
=20

quickfixj.appctx.xml:

=20
=20
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframe=
work.org/dtd/spring-beans.dtd">

<beans>

    <bean id=3D"_quickfix:propertyOverrideConfigurer"
        class=3D"org.springframework.beans.factory.config.PropertyOverrideC=
onfigurer">
        <property name=3D"location" value=3D"classpath:quickfix.properti=
es"/>
        <property name=3D"ignoreResourceNotFound" value=3D"true"/>
    </bean>

    <!-- TODO Document as available -->
    <bean id=3D"quickfix:FIX42" class=3D"org.springframework.core.io.Cla=
ssPathResource">
        <constructor-arg value=3D"FIX42.xml"/>
    </bean>
    <!-- TODO Document as available -->
    <bean id=3D"quickfix:FIX43" class=3D"org.springframework.core.io.Cla=
ssPathResource">
        <constructor-arg value=3D"FIX43.xml"/>
    </bean>
    <!-- TODO Document as available -->
    <bean id=3D"quickfix:FIX44" class=3D"org.springframework.core.io.Cla=
ssPathResource">
        <constructor-arg value=3D"FIX44.xml"/>
    </bean>


    <bean name=3D"_quickfix:sessionSettingsAwareProcessor"
        class=3D"quickfix.spring.sessionsettings.SessionSettingsAwareProces=
sor"/>

    <bean name=3D"_quickfix:sessionSettings"
        class=3D"org.springframework.beans.factory.config.PropertyPathFacto=
ryBean">
        <property name=3D"targetObject" ref=3D"_quickfix:sessionSettings=
AwareProcessor"/>
        <property name=3D"propertyPath" value=3D"sessionSettings"/>
    </bean>


    <bean name=3D"_quickfix:cachingSessionFactoryAwareProcessor"
        class=3D"quickfix.spring.session.CachingSessionFactoryAwareProcesso=
r">
        <property name=3D"sessionSettings" ref=3D"_quickfix:sessionSetti=
ngs"/>
    </bean>

    <!-- TODO Document configurable property: corePoolSize -->
    <bean id=3D"quickfix:scheduledExecutorService"
        class=3D"quickfix.spring.ScheduledExecutorServiceFactoryBean"/>


    <bean name=3D"_quickfix.transport:propertyEditors"
        class=3D"org.springframework.beans.factory.config.CustomEditorConfi=
gurer">
        <property name=3D"customEditors">
            <map>
                <entry key=3D"quickfix.SessionID">
                    <bean class=3D"quickfix.spring.session.SessionIDProp=
ertyEditor"/>
                </entry>
                <entry key=3D"quickfix.spring.session.SessionSchedule"&g=
t;
                    <bean class=3D"quickfix.spring.session.SessionSchedu=
lePropertyEditor"/>
                </entry>
                <entry key=3D"java.net.SocketAddress">
                    <bean class=3D"quickfix.spring.transport.InetSocketA=
ddressPropertyEditor"/>
                </entry>
                <entry key=3D"java.net.InetSocketAddress">
                    <bean class=3D"quickfix.spring.transport.InetSocketA=
ddressPropertyEditor"/>
                </entry>
            </map>
        </property>
    </bean>

</beans>
=20
------=_Part_16968_48133681.1711616223785--