org.jooq.impl.DefaultExecuteListenerProvider Java Examples

The following examples show how to use org.jooq.impl.DefaultExecuteListenerProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: UserDataSources.java    From secrets-proxy with Apache License 2.0 5 votes vote down vote up
private DSLContext getDslContext(PlatformTransactionManager txManager, DataSource dataSource) {
  DefaultConfiguration config = new DefaultConfiguration();
  config.set(new DataSourceConnectionProvider(new TransactionAwareDataSourceProxy(dataSource)));
  config.set(new DefaultExecuteListenerProvider(new JooqExceptionTranslator()));
  config.set(new SpringTransactionProvider(txManager));
  return new DefaultDSLContext(config);
}
 
Example #2
Source File: PersistenceContextIntegrationTest.java    From tutorials with MIT License 5 votes vote down vote up
@Bean
public DefaultConfiguration configuration() {
    DefaultConfiguration jooqConfiguration = new DefaultConfiguration();
    jooqConfiguration.set(connectionProvider());
    jooqConfiguration.set(new DefaultExecuteListenerProvider(exceptionTransformer()));

    String sqlDialectName = environment.getRequiredProperty("jooq.sql.dialect");
    SQLDialect dialect = SQLDialect.valueOf(sqlDialectName);
    jooqConfiguration.set(dialect);

    return jooqConfiguration;
}
 
Example #3
Source File: InitialConfiguration.java    From tutorials with MIT License 5 votes vote down vote up
public DefaultConfiguration configuration() {
    DefaultConfiguration jooqConfiguration = new DefaultConfiguration();

    jooqConfiguration.set(connectionProvider());
    jooqConfiguration.set(new DefaultExecuteListenerProvider(new ExceptionTranslator()));

    return jooqConfiguration;
}