[QFJ-47] no sample config file for sample code Created: 12/Aug/06  Updated: 22/Aug/06  Resolved: 17/Aug/06

Status: Closed
Project: QuickFIX/J
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Default
Reporter: Markus Khouri Assignee: Steve Bate
Resolution: Not a bug Votes: 0
Labels: None


 Description   

The sample code on http://www.quickfixj.org/quickfixj/usermanual/usage/application.html does not include the configuration file.

Using the configuration file found on http://www.quickfixj.org/quickfixj/usermanual/usage/configuration.html returns the following errors when executing the sample code:

Exception in thread "main" quickfix.ConfigError: No acceptor sessions found in settings.
at quickfix.mina.acceptor.AbstractSocketAcceptor.createSessions(AbstractSocketAcceptor.java:135)
at quickfix.mina.acceptor.AbstractSocketAcceptor.<init>(AbstractSocketAcceptor.java:62)
at quickfix.mina.acceptor.AbstractSocketAcceptor.<init>(AbstractSocketAcceptor.java:78)
at quickfix.SocketAcceptor.<init>(SocketAcceptor.java:36)
at xxx.Brook.mainAcceptor(Brook.java:228)
at xxx.Brook.main(Brook.java:169)

{{{
public static void main(String args[]) throws Exception {
if(args.length != 1) return;
String fileName = args[0];

Application application = new Application();
Settings settings = new Settings(new FileInputStream(fileName));
MessageStoreFactory storeFactory = new FileStoreFactory(settings);
LogFactory logFactory = new FileLogFactory(settings);
MessageFactory messageFactory = new DefaultMessageFactory();

// ERROR occurs on following line
Acceptor acceptor = new SocketAcceptor (application, storeFactory, settings, logFactory, messageFactory);
acceptor.start();
// while( condition == true )

{ do something; }

acceptor.stop();
}
}}}



 Comments   
Comment by Steve Bate [ 17/Aug/06 ]

Yes, the sample configuration and the sample Application implementation are independent examples and not intended to be used together. For complete examples with associated configuration files, see the sources for quickfix.examples.banzai.Banzai (initiator) and the quickfix.examples.executor.Executor (acceptor).

Generated at Sat Apr 27 06:59:30 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.