[QFJ-23] Create initial Spring Framework support and examples Created: 04/Jun/06  Updated: 10/Jan/10  Resolved: 10/Jan/10

Status: Closed
Project: QuickFIX/J
Component/s: None
Affects Version/s: None
Fix Version/s: Future Releases

Type: New Feature Priority: Major
Reporter: Steve Bate Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None


 Comments   
Comment by Toli Kuznets [ 22/Dec/06 ]

Steve,

we took a first crack at configuring QuickfixJ through Spring in our latest release.
we have created 2 sets of files, quickfix.appctx.xml and quickfixj.xml that you can find at
http://trac.marketcetera.org/trac.fcgi/browser/platform/trunk/oms/src/main/resources

The first one sets up the paths for DataDictionaries to load, the quickfixj.xml deals with creating the log factories,
specifying session defaults, socket initiators, etc.

the overall app for us is setup in a different file (oms.xml),but perhaps these could act as a starting point for other examples.

Comment by David Gibbs [ 13/Oct/09 ]

In case it helps any one I did the following

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:util="http://www.springframework.org/schema/util" xmlns="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.5.xsd">

<bean id="quickfixConfig" class="java.io.FileInputStream">
<constructor-arg value="./src/test/config.uat/quick-fix.cfg" />
</bean>

<bean id="sessionSettings" class="quickfix.SessionSettings">
<constructor-arg ref="quickfixConfig" />
</bean>

<bean id="logFactory" class="quickfix.SLF4JLogFactory">
<constructor-arg ref="sessionSettings" />
</bean>

<bean id="messageFactory" class="quickfix.DefaultMessageFactory">
</bean>

<bean id="messageStoreFactory" class="quickfix.FileStoreFactory">
<constructor-arg ref="sessionSettings" />
</bean>

</beans>

Which is then included in a master config file where the acceptor is configured.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:util="http://www.springframework.org/schema/util"
xmlns="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-2.5.xsd">

<context:annotation-config />

<import resource="spring.quickfixj.xml"/>
.....

<bean id="acceptor" class="quickfix.SocketAcceptor">
<constructor-arg ref="application" />
<constructor-arg ref="messageStoreFactory" />
<constructor-arg ref="sessionSettings" />
<constructor-arg ref="logFactory" />
<constructor-arg ref="messageFactory" />
</bean>

<bean id="choreographer" class="com.iggroup.fix.otc.trading.Choreographer">
<constructor-arg>
<list>
.......
</list>
</constructor-arg>
<constructor-arg ref="acceptor" />
</bean>

.....

</beans>

Comment by Steve Bate [ 10/Jan/10 ]

Nobody has been asking for this, so I'm closing the feature request (which I submitted).

Generated at Sat Nov 23 14:29:07 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.