Package org.springframework.jdbc.datasource

Examples of org.springframework.jdbc.datasource.DataSourceTransactionManager


        JdbcTemplate template = new JdbcTemplate();
        template.setDataSource(datasource);
        template.setNativeJdbcExtractor(new CommonsDbcpNativeJdbcExtractor());
        context.getBeanFactory().registerSingleton("statsInterfaceTemplate", template);

        DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();
        transactionManager.setDataSource(datasource);
        context.getBeanFactory().registerSingleton("statsTransactionManager", transactionManager);

        RunStatsManager rsm = new RunStatsManager(template);
        context.getBeanFactory().registerSingleton("runStatsManager", rsm);
      }
View Full Code Here


        EmbeddedDatabase dataSource = new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.H2).build();
        return dataSource;
    }

    public PlatformTransactionManager createPlatformTransactionManager(DataSource dataSource) {
        return new DataSourceTransactionManager(dataSource);
    }
View Full Code Here

  @Autowired
  DataSource dataSource;

  @Bean
  public PlatformTransactionManager transactionManager() {
    return new DataSourceTransactionManager(this.dataSource);
  }
View Full Code Here

  @Autowired
  private Environment env;

  @Bean
  public PlatformTransactionManager transactionManager() {
    return new DataSourceTransactionManager(dataSource());
  }
View Full Code Here

  @Configuration
  @EnableTransactionManagement
  static class DefaultTxManagerNameConfig {
    @Bean
    PlatformTransactionManager transactionManager(DataSource dataSource) {
      return new DataSourceTransactionManager(dataSource);
    }
View Full Code Here

  @Configuration
  @EnableTransactionManagement
  static class CustomTxManagerNameConfig {
    @Bean
    PlatformTransactionManager txManager(DataSource dataSource) {
      return new DataSourceTransactionManager(dataSource);
    }
View Full Code Here

  @Configuration
  @EnableTransactionManagement
  static class NonConventionalTxManagerNameConfig {
    @Bean
    PlatformTransactionManager txManager(DataSource dataSource) {
      return new DataSourceTransactionManager(dataSource);
    }
View Full Code Here

  @Configuration
  @EnableTransactionManagement(proxyTargetClass=true)
  static class ProxyTargetClassTxConfig {
    @Bean
    PlatformTransactionManager transactionManager(DataSource dataSource) {
      return new DataSourceTransactionManager(dataSource);
    }
View Full Code Here

  @Configuration
  @EnableTransactionManagement(mode=AdviceMode.ASPECTJ)
  static class AspectJTxConfig {
    @Bean
    PlatformTransactionManager transactionManager(DataSource dataSource) {
      return new DataSourceTransactionManager(dataSource);
    }
View Full Code Here

    if (null == rowMapper) {
      throw new NullPointerException("RowMapper is null. ");
    }
    this.rowMapper = rowMapper;
    confirmEntitiesExistence();
    transactionManager = new DataSourceTransactionManager(dataSource);
    udsCache = new UserDataStoreCache<UserGroupMembership>();
    this.rowMapper = rowMapper;
  }
View Full Code Here

TOP

Related Classes of org.springframework.jdbc.datasource.DataSourceTransactionManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.