[QFJ-165] Allow for dynamic definition of sessions Created: 26/Apr/07 Updated: 11/Feb/09 Resolved: 13/Jul/07 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | Engine |
Affects Version/s: | 1.1.0 |
Fix Version/s: | 1.3.0 |
Type: | Improvement | Priority: | Default |
Reporter: | Graham Miller | Assignee: | Toli Kuznets |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Environment: |
All |
Attachments: | dynamicsessions.patch | ||||||||||||
Issue Links: |
|
Description |
As requested previously (http://www.quickfixj.org/jira/browse/QFJ-125), we have a few compelling use cases where we would like our QuickFIX/J-based server application to be able to update session descriptions on the fly. I have attached patches to the current SVN HEAD (621), that provide the basic facilities for dynamic session definition in QuickFIX.
And some potentially controversial changes:
With all of these changes, it is now possible to start up a QuickFIX/J socket acceptor with a .properties file with only a global section, like this: ConnectionType=acceptor FileStorePath=output/data/server HeartBtInt=30 StartTime=00:00:00 EndTime=00:00:00 ReconnectInterval=15 ResetOnLogout=Y ResetOnDisconnect=Y SendResetSeqNumFlag=Y SocketAcceptPort=7001 UseDynamicSessions=Y In order to make real use of it, you will need to implement your own SessionFactory: in the example below it is called MySessionFactory. I have an implementation of a SessionFactory that accepts all incoming session requests, I don't think it's useful in production, but we could maybe add it to the test code. MessageFactory messageFactory = new DefaultMessageFactory(); MessageStoreFactory messageStoreFactory = new MemoryStoreFactory(); Application application = new MyApplication(); SessionSettings settings = getSettings(); LogFactory logFactory = new ScreenLogFactory(); SessionFactory sessionFactory = new MySessionFactory(settings, application, messageStoreFactory, messageFactory); SocketAcceptor acceptor = new SocketAcceptor(sessionFactory, settings); acceptor.start(); Ultimately it would be nice to have a couple of standard implementations of SessionFactory that read session configuration data out of a DB, or an LDAP server. |
Comments |
Comment by Toli Kuznets [ 26/Apr/07 ] |
125 was actually never implemented |
Comment by Toli Kuznets [ 26/Apr/07 ] |
fixing up markup to try and get it to show up "pretty" |