|
From: Steve <st...@te...> - 2006-10-20 20:32:12
|
Would a memory store work for your testing purposes? If not, you can get the MessageStore from the Session and cast it to a FileStore to call closeFiles() or deleteFiles() (which closes the files first). See the FileStoreTest for an example. The tests close and reopen the files for each test. HTH. Steve Nick Fortescue wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > 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 > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users > |