[Quickfix-developers] .NET stopping and starting initiator
Brought to you by:
orenmnero
|
From: Patrick W. <pw...@ka...> - 2007-10-25 00:08:47
|
Hi,
=20
When a socket initiator is stopped the storage files are still in use so
that starting it again causes an error ('cannot open body file').
I get the problem when using the .NET version of QuickFix 1.12.4 but I
notice that there is at least one other thread asking about this
problem.
Here is the relevant code section copied from that previous thread:
=20
> settings =3D new SessionSettings(configFile);
> storeFactory =3D new
> FileStoreFactory(settings); logFactory =3D new =
FileLogFactory(settings);
> messageFactory =3D new DefaultMessageFactory(); initiator =3D new
> ThreadedSocketInitiator(this, storeFactory, settings, logFactory,
> messageFactory);
>
>...
> initiator.start();
>...
> initiator.stop();
> initiator =3D null;
> settings =3D null;
> storeFactory =3D null;
> logFactory =3D null;
> messageFactory =3D null;
> ----------------------------------------
> At this point all of the four storage files are still locked (can't be
> opened in notepad). Forcing garbage collection doesn't help.
=20
My question is:
Has anyone managed to work around/fix this problem?
I am using QuickFix from a .NET 2.0 WinForms app in C#.
=20
Thanks,
Patrick Wright
=20
|