Search in sources :

Example 1 with JdbcDataSourceProvider

use of uk.gov.justice.services.jdbc.persistence.JdbcDataSourceProvider in project microservice_framework by CJSCommonPlatform.

the class EventRepositoryFactory method getEventJdbcRepository.

public static EventJdbcRepository getEventJdbcRepository(final DataSource dataSource) throws NamingException {
    final EventJdbcRepository eventJdbcRepository = new EventJdbcRepository();
    eventJdbcRepository.dataSource = dataSource;
    eventJdbcRepository.jdbcDataSourceProvider = new JdbcDataSourceProvider();
    eventJdbcRepository.logger = getLogger(EventJdbcRepository.class);
    eventJdbcRepository.jdbcRepositoryHelper = new JdbcRepositoryHelper();
    eventJdbcRepository.eventInsertionStrategy = new AnsiSQLEventLogInsertionStrategy();
    return eventJdbcRepository;
}
Also used : JdbcRepositoryHelper(uk.gov.justice.services.jdbc.persistence.JdbcRepositoryHelper) AnsiSQLEventLogInsertionStrategy(uk.gov.justice.services.eventsourcing.repository.jdbc.AnsiSQLEventLogInsertionStrategy) JdbcDataSourceProvider(uk.gov.justice.services.jdbc.persistence.JdbcDataSourceProvider)

Aggregations

AnsiSQLEventLogInsertionStrategy (uk.gov.justice.services.eventsourcing.repository.jdbc.AnsiSQLEventLogInsertionStrategy)1 JdbcDataSourceProvider (uk.gov.justice.services.jdbc.persistence.JdbcDataSourceProvider)1 JdbcRepositoryHelper (uk.gov.justice.services.jdbc.persistence.JdbcRepositoryHelper)1