[QFJ-522] Engine incorrectly assumes CstmApplVerID implies Session and DataDictionary uniqueness Created: 10/May/10  Updated: 15/Nov/12  Resolved: 24/Apr/11

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

Type: Bug Priority: Default
Reporter: Brent Bradbury Assignee: Grant Birchmeier
Resolution: Fixed Votes: 1
Labels: None
Environment:

Centos 5.3, Sun JDK 1.6


Attachments: File CORRECTED_executorExampleAddendum.diff     File cstmApplVerIDFix.diff     File executorExampleAddendum.diff    

 Description   

To show bug:
1) Create FIXT1.1 / FIX.5.0 session with custom TransportDataDictionary and ApplicationDataDictionary
2) Start session, send session level logins
3) Try sending Application-level message to QFix/J session with CstmApplVerID (field 1129) set in the header to some value (I chose '5.4' for the value)
4) QFix/J emits exception trying to find DataDictionary FIX50_5_4, where '5_4' reflects value of the CstmApplVerID field

Why it happens:
QFix/J indexes DataDictionaries by a AppVersionKey. This key uses ApplVerID and CstmApplVerID fields to generate a unique reference to a given DataDictionary. I think it is a correct interpretation of the FIX spec to say that it should only use ApplVerID, because CstmApplVerID (1) is not a required field, and thus may or may not consistently appear in message headers, (2) does not have a required default value in a configuration file (e.g. DefaultApplVerID) (3) is defined in the FIX spec as "Used to support bilaterally agreed custom functionality", in no way affecting the DataDictionary or implying that a specific one should be used.

The fix:
I fixed this by removing all references to CstmApplVerID in the Engine, which allows CstmApplVerID to behave like a normal header field, leaving the implementation of any functionality based on its value up to the user. Most of the revolved around DefaultDataDictionaryProvider.java.



 Comments   
Comment by Brent Bradbury [ 10/May/10 ]

Apply the patch to trunk/core/src.

I'm not sure how the unit tests shake out, because I don't see where the specifics of failures/errors is shown?

Comment by Brent Bradbury [ 10/May/10 ]

Also, the patch is against rev 949 of trunk SVN.

Comment by Grant Birchmeier [ 11/Aug/10 ]

If you patch cstmApplVerIDFix.diff on a clean checkout and build, or if you patch then "ant clean" then rebuild, you'll get a compile error for the "executor" example.

It needed to be updated to match an updated interface, which is a one-line fix described in attached patch executorExampleAddendum.diff.

Comment by Grant Birchmeier [ 11/Aug/10 ]

Oops. I messed up my patch file. Use this one. Apologies.

Comment by Grant Birchmeier [ 24/Apr/11 ]

code fix in trunk r1020

Generated at Sat Nov 23 12:09:21 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.