[QFJ-406] No way for FileStore to be closed Created: 27/Feb/09 Updated: 15/Nov/12 Resolved: 06/Apr/10 |
|
Status: | Closed |
Project: | QuickFIX/J |
Component/s: | None |
Affects Version/s: | 1.4.0 |
Fix Version/s: | 1.5.0 |
Type: | Improvement | Priority: | Default |
Reporter: | Jerry Shea | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 0 |
Labels: | None | ||
Environment: |
Windows XP sp3, Java 6 |
Attachments: | 406.patch | ||||||||
Issue Links: |
|
Description |
If I create a ThreadedSocketInitiator with a FileStoreFactory, start, stop and re-start it, I get the following in stderr: File delete failed: ...\FIX.4.2-xxx.header This seems to be because ThreadedSocketInitiator gets a new FileStore from FileStoreFactory which then locks files (for example - initializeMessageIndex opens a FileOutputStream for the header file). When I stop the initiator this FileStore is never closed - the FileStore doesn't actually have any kind of close or dispose method. When I restart the initiator it gets a new FileStore which barfs with the above errors when it can't delete the files. I'm happy to work up a patch for this but would appreciate some guidance as to what the commiters think should close the FileStore. |
Comments |
Comment by Jörg Thönnes [ 27/Feb/09 ] |
In reply to Would be great if you could suggest patches. Looking at the FileStore, there are already internal methods to close the files. Could you also suggest how to extend the MessageStore API to provide a close() method and more important where in the QF/J code you would call this method? Thanks, Jörg |
Comment by Steve Bate [ 03/Mar/09 ] |
One approach is to create an interface for objects to listen to Connector start/stop events. The Connector implementations could automatically register stores or logs as listeners if they implement that interface. |
Comment by Jerry Shea [ 03/Mar/09 ] |
Hi Steve, |
Comment by Jerry Shea [ 15/Jun/09 ] |
Guys, is there any chance we could get this change assigned to 1.4.1 release? Let me know if there's anything else I can do to help this along |
Comment by Steve Bate [ 06/Apr/10 ] |
This will be worked under the original |