<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>I fixed this probem in QFn source code. Now is working fine.<br> <BR><div><hr id="stopSpelling">From: rimokatolik@outlook.com<br>To: quickfixn@lists.quickfixn.com<br>Date: Sat, 27 Jun 2015 06:10:34 -0700<br>Subject: {{Quickfixn}} Acceptor and initiator in the same app<br><br>

<style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style>
<div dir="ltr">I was searching but besides simple statement that this has been done could not find any other useful information. I cannot get pass construction phase as I get exception:<br> <br>Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: The process ca<br>nnot access the file 'F:\binx64\StoreAcceptor1\FIX.4.4-SIMULATOR1-CLIENT_SESSION1.header' because it is being used by another process.<br>   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)<br>   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptio<br>ns options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)<br>   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Bool<br>ean bFromProxy, Boolean useLongPath, Boolean checkHost)<br>   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)<br>   at System.IO.StreamReader..ctor(String path)<br>   at QuickFix.FileStore.ConstructFromFileCache() in F:\Project\quickfixn-1.5.0\QuickFIXn\FileStore.cs:line 119<br>   at QuickFix.FileStore.open() in F:\Project\quickfixn-1.5.0\QuickFIXn\FileStore.cs:line 75<br>   at QuickFix.FileStore..ctor(String path, SessionID sessionID) in F:\Project\quickfixn-1.5.0\QuickFIXn\FileStore.cs:line 70<br>   at QuickFix.FileStoreFactory.Create(SessionID sessionID) in F:\Project\quickfixn-1.5.0\QuickFIXn\FileStoreFactory.cs:line 29<br>   at QuickFix.Session..ctor(IApplication app, IMessageStoreFactory storeFactory, SessionID sessID, DataDictionaryProvider dataDictProvider, SessionSchedule<br> sessionSchedule, Int32 heartBtInt, ILogFactory logFactory, IMessageFactory msgFactory, String senderDefaultApplVerID) in F:\Project\quickfixn-1.5.0\QuickFI<br>Xn\Session.cs:line 229<br>   at QuickFix.SessionFactory.Create(SessionID sessionID, Dictionary settings) in F:\Project\quickfixn-1.5.0\QuickFIXn\SessionFactory.cs:line 79<br>   at QuickFix.AbstractInitiator.Start() in F:\Project\quickfixn-1.5.0\QuickFIXn\AbstractInitiator.cs:line 67<br> <br>I have tried various configurations, the last one looks like this:<br> <br><font face="Consolas" size="2"><font face="Consolas" size="2"># Default settings. These settings are inherited by each<br>
<br># individual session found below<br>
<br>[DEFAULT]<br>

<br>BeginString=FIX.4.4<br>
<br>HeartBtInt=30<br>
<br>FileLogPath=.\Logs<br>

<br># Start and End times for the FIX session (in UTC)<br>
<br>StartTime=00:00:00<br>
<br>EndTime=00:00:00<br>

<br>UseDataDictionary=Y<br>
<br>DataDictionary=FIXFXCM10.xml<br>
<br>ValidateUserDefinedFields=N<br>
<br>ValidateFieldsHaveValues=N<br>
<br>ValidateFieldsOutOfOrder=N<br>

<br>ReconnectInterval=20<br>
<br>ResetOnDisconnect=Y<br>
<br>ResetSeqNumFlag=Y<br>
<br>SendResetSeqNumFlag=Y<br>
<br>ContinueInitializationOnError=Y<br>

<br>MillisecondsInTimeStamp=Y<br>
<br>SocketNodelay=Y<br>
<br>#PersistMessages=N<br>

<br>[SESSION]<br>
<br>FileStorePath=.\StoreClient1<br>
<br>ConnectionType=initiator<br>
<br>SenderCompID=CLIENT_SESSION1<br>
<br>#SenderSubID=SUBID<br>
<br>TargetCompID=SIMULATOR1<br>
<br>#TargetSubID=SUBIDa<br>
<br>SocketConnectHost=127.0.0.1<br>
<br>SocketConnectPort=11613<br>
<br>ResetOnLogon=Y<br>
<br>ResetOnLogout=Y<br>
<br>ResetOnDisconnect=Y<br>

<br>[SESSION]<br>
<br>FileStorePath=.\StoreClient2<br>
<br>ConnectionType=initiator<br>
<br>SenderCompID=CLIENT_SESSION2<br>
<br>#SenderSubID=SUBID<br>
<br>TargetCompID=SIMULATOR2<br>
<br>#TargetSubID=SUBIDb<br>
<br>SocketConnectHost=127.0.0.1<br>
<br>SocketConnectPort=11614<br>
<br>ResetOnLogon=Y<br>
<br>ResetOnLogout=Y<br>
<br>ResetOnDisconnect=Y<br>

<br>[SESSION]<br>
<br>FileStorePath=.\StoreAcceptor1<br>
<br>ConnectionType=acceptor<br>
<br>SenderCompID=SIMULATOR1<br>
<br>#SenderSubID=SUBID<br>
<br>#TargetSubID=SUBID<br>
<br>TargetCompID=CLIENT_SESSION1<br>
<br>SocketAcceptHost=127.0.0.1<br>
<br>SocketAcceptPort=11613<br>

<br>[SESSION]<br>
<br>FileStorePath=.\StoreAcceptor2<br>
<br>ConnectionType=acceptor<br>
<br>SenderCompID=SIMULATOR2<br>
<br>#TargetSubID=SUBID<br>
<br>#SenderSubID=SUBID<br>
<br>TargetCompID=CLIENT_SESSION2<br>
<br>SocketAcceptHost=127.0.0.1<br>
<br>SocketAcceptPort=11614<br></font> <br></font> <br> <br>Thank you,<br>Dinko<br>                                           </div>
<br>_______________________________________________
Quickfixn mailing list
Quickfixn@lists.quickfixn.com
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</div>                                       </div></body>
</html>