{{Quickfixn}} error while re-run the initiator
Walter Robert Ditzler
ditwal001 at gmail.com
Wed Mar 6 15:48:34 PST 2013
Hey,
thanks a lot for information, i just modified prefix (include timestamp) in FIleStore.cs. not nice but helps,
thanks walter
***
public static string Prefix(SessionID sessionID)
{
DateTime utcnow = DateTime.UtcNow;
string timestamp = (utcnow.Year.ToString().Length == 2 ? "20" + utcnow.Year.ToString() : utcnow.Year.ToString());
timestamp = timestamp + "-" + (utcnow.Month.ToString().Length == 1 ? "0" + utcnow.Month.ToString() : utcnow.Month.ToString());
timestamp = timestamp + "-" + (utcnow.Day.ToString().Length == 1 ? "0" + utcnow.Day.ToString() : utcnow.Day.ToString());
timestamp = timestamp + "_" + (utcnow.Hour.ToString().Length == 1 ? "0" + utcnow.Hour.ToString() : utcnow.Hour.ToString());
timestamp = timestamp + "" + (utcnow.Minute.ToString().Length == 1 ? "0" + utcnow.Minute.ToString() : utcnow.Minute.ToString());
timestamp = timestamp + "" + (utcnow.Second.ToString().Length == 1 ? "0" + utcnow.Second.ToString() : utcnow.Second.ToString());
timestamp = timestamp + "." + (utcnow.Millisecond.ToString().Length == 1 ? "00" + utcnow.Millisecond.ToString() : (utcnow.Millisecond.ToString().Length == 2 ? "0" + utcnow.Millisecond.ToString() : utcnow.Millisecond.ToString()));
System.Text.StringBuilder prefix = new System.Text.StringBuilder(timestamp+"_"+sessionID.BeginString)
.Append('-').Append(sessionID.SenderCompID);
if (SessionID.IsSet(sessionID.SenderSubID))
prefix.Append('_').Append(sessionID.SenderSubID);
if (SessionID.IsSet(sessionID.SenderLocationID))
prefix.Append('_').Append(sessionID.SenderLocationID);
prefix.Append('-').Append(sessionID.TargetCompID);
if (SessionID.IsSet(sessionID.TargetSubID))
prefix.Append('_').Append(sessionID.TargetSubID);
if (SessionID.IsSet(sessionID.TargetLocationID))
prefix.Append('_').Append(sessionID.TargetLocationID);
if (sessionID.SessionQualifier.Length != 0)
prefix.Append('-').Append(sessionID.SessionQualifier);
return prefix.ToString();
}
From: quickfixn-bounces at lists.quickfixn.com [mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Valcho Valchev
Sent: Mittwoch, 6. März 2013 20:10
To: Mailing list for QuickFIX/n
Subject: Re: {{Quickfixn}} error while re-run the initiator
My workaround is to use custom StoreFactory which writes to DB instead of FileStoreFactory. Hope that'll help.
On Wed, Mar 6, 2013 at 8:02 AM, Grant Birchmeier <gbirchmeier at connamara.com <mailto:gbirchmeier at connamara.com> > wrote:
This is a known issue. We have a submission for a fix that we will review soon.
https://github.com/connamara/quickfixn/issues/48
I'm not aware of a workaround, aside from simply shutting the app completely.
-Grant
On Wed, Mar 6, 2013 at 9:58 AM, Walter Robert Ditzler
<ditwal001 at gmail.com <mailto:ditwal001 at gmail.com> > wrote:
> Hi there,
>
> I start the initiator:
>
> ***
> _SessionSettings = new
> SessionSettings(System.AppDomain.CurrentDomain.BaseDirectory +
> "communicator.cfg");
> _FileStoreFactory = new FileStoreFactory(_SessionSettings);
> _Application = new Application();
> _SocketInitiator = new SocketInitiator(_Application, _FileStoreFactory,
> _SessionSettings);
> _SocketInitiator.Start();
> ***
>
> Then I stop it
>
> ***
> _SocketInitiator.Stop(true);
> ***
>
> When I want to start it again, without closing my app
>
> ***
> _SocketInitiator.Start();
> ***
>
> I get the following error
>
> ***
> "The process cannot access the file
> 'C:\\DATA\\ABO_DEV\\VS2012\\sw\\output\\store\\FIX.4.2-DATA_FIX_xxx.header'
> because it is being used by another process."
> ***
>
> Is there a way to release that file from the memory? Which component do I
> have to relase?
>
> Thanks a lot,
>
> Walter.
>
>
> Ps: I tried:
>
> ***
> if (_SocketInitiator == null)
> return;
>
> if (_SocketInitiator.IsLoggedOn())
> _SocketInitiator.Stop(true);
>
> if (_Application != null)
> _Application = null;
>
> if (_FileStoreFactory != null)
> _FileStoreFactory = null;
> ***
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com <mailto:Quickfixn at lists.quickfixn.com>
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
--
Grant Birchmeier
Connamara Systems, LLC
Made-To-Measure Trading Solutions.
Exactly what you need. No more. No less.
http://connamara.com
_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com <mailto:Quickfixn at lists.quickfixn.com>
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20130307/4e23f138/attachment-0002.htm>
More information about the Quickfixn
mailing list