esanchezros / quickfixj-spring-boot-starter-examples

QuickFixJ Spring Boot Starter Examples
Other
65 stars 41 forks source link

Can't start simple-server-with-database #18

Closed PhanNN closed 2 years ago

PhanNN commented 2 years ago

Hello,

After run mvn clean install, I import simple-server-with-database into Eclipse IDE and try to start this project, but the application failed to start because of A configuration error has been detected in the QuickFIX/J settings provided: org.logicalcobwebs.proxool.ProxoolDataSource Did you face this problem?

Thank you

P/s: I try to add proxool, common-logging into pom.xml, but nothing happened!!!

esanchezros commented 2 years ago

Hi @PhanNN ,

Thanks for reporting this issue. QuickFixJ uses Proxool as the default DataSource (needed by JDBC store and log for connection pooling). The service should set a different DataSource it in the jdbc factory explicitly.

I'll push a fix for the issue shortly.

Thanks

PhanNN commented 2 years ago
@Bean
public LogFactory serverLogFactory(final SessionSettings serverSessionSettings,
        final DataSource dataSource) {
    final JdbcLogFactory jdbcLogFactory = new JdbcLogFactory(serverSessionSettings);
    jdbcLogFactory.setDataSource(dataSource);
    return jdbcLogFactory;
}

@Bean
public MessageStoreFactory serverMessageStoreFactory(
        final SessionSettings serverSessionSettings, final DataSource dataSource) {
    final JdbcStoreFactory jdbcStoreFactory = new JdbcStoreFactory(serverSessionSettings);
    jdbcStoreFactory.setDataSource(dataSource);
    return jdbcStoreFactory;
}

Fixed by using BasicDataSource from DbConfiguration :D

esanchezros commented 2 years ago

Thanks, that's exactly the change I pushed yesterday. Many thanks @PhanNN