{{Quickfixn}} File-Lock Problem with reconnect ...
Philipp Rümmele
philipp at ruemmele.net
Thu Oct 9 02:16:19 PDT 2014
Hello,
how do i close a fix session, so that it doesn't lock the store files ?
I get an error - when i try to reconnect - File is locked by an other process...
Error Message:
Der Prozess kann nicht auf die Datei "c:\FixConfig\store2\FIX.4.4-T091-PXMD.header" zugreifen, da sie von einem anderen Prozess verwendet wird.
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) ..............................
In my app - i have buttons to start/stop the connection to a FIX Server
private void btnStart_Click(object sender, EventArgs e)
{
// Event für DebugText
application_Pricing.dbgChanged += new TradeClientAppPricing.DebugMessageHandler(dbg);
// Event für DataOutput
application_Pricing.DataChanged += new TradeClientAppPricing.DataMessageHandler(getData);
// Objekt für Speicher
storeFactory_Pricing = new QuickFix.FileStoreFactory(settings_Pricing);
// Objekt für Logging
logFactory_Pricing = new QuickFix.ScreenLogFactory(settings_Pricing);
// Objekt für Netzwerkverbindung
initiator_Pricing = new QuickFix.Transport.SocketInitiator(application_Pricing, storeFactory_Pricing, settings_Pricing, logFactory_Pricing);
// Verbindung an TradingClient übergeben
application_Pricing.MyInitiator = initiator_Pricing;
// Verbindung starten
initiator_Pricing.Start();
}
private void btnStop_Click(object sender, EventArgs e)
{
// Netzwerkverbindung trennen
initiator_Pricing.Stop();
application_Pricing = null;
initiator_Pricing = null;
logFactory_Pricing = null;
storeFactory_Pricing = null;
}
Any hints, ideas how to stop this file locking ?
Thanks and greetings
Philipp
ruemmele.net
Philipp Rümmele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20141009/71ba4031/attachment-0001.htm>
More information about the Quickfixn
mailing list