|
From: Nick F. <ni...@ox...> - 2006-10-19 15:59:02
|
I think I've found a File locking resource leak in quickfixj (SVN Trunk, head). I wondered if anyone could confirm it is a defect, and if so the best way to fix it. When you create a FileStore for a given session it opens two RandomAccessFiles for the message store and sequence number file. These files are only closed by the method closeFiles(), which is only used in initialize. And when initialize closes the files it immediately opens them again. This means that unless you call closeFiles() yourself, the file will remain open (and for example, you can't delete the files programmatically). However, if you create an initiator, you do it with a MessageStoreFactory, not a MessageStore, which means you have no access to the FileStore to let you close the files. This is a problem for me. I am running some conformance tests for my counterparty, and I want to do them in a single Application - create a fix session, do the test, close the session, delete the files, and then proceed with the next test. At the moment this seems to be impossible, as once I am finished with the first session I have no way of deleting the files without exiting the VM. Am I going to have to write my own FileStoreFactory? Nick |