org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers Java Examples

The following examples show how to use org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers. 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: ShardingTransactionProxyConfiguration.java    From opensharding-spi-impl with Apache License 2.0 6 votes vote down vote up
/**
 * Build hibernate transaction manager.
 *
 * @param transactionManagerCustomizers transaction manager customizers
 * @return jpa transaction manager
 */
@Bean
@ConditionalOnMissingBean(PlatformTransactionManager.class)
@ConditionalOnClass(value = LocalContainerEntityManagerFactoryBean.class, name = "javax.persistence.EntityManager")
public PlatformTransactionManager jpaTransactionManager(final ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
    JpaTransactionManager result = new JpaTransactionManager();
    if (null != transactionManagerCustomizers.getIfAvailable()) {
        transactionManagerCustomizers.getIfAvailable().customize(result);
    }
    return result;
}
 
Example #2
Source File: ShardingTransactionProxyConfiguration.java    From opensharding-spi-impl with Apache License 2.0 5 votes vote down vote up
/**
 * Build datasource transaction manager.
 *
 * @param dataSource data source
 * @param transactionManagerCustomizers transaction manager customizers
 * @return datasource transaction manager
 */
@Bean
@ConditionalOnMissingBean(PlatformTransactionManager.class)
public PlatformTransactionManager dataSourceTransactionManager(final DataSource dataSource, final ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
    DataSourceTransactionManager result = new DataSourceTransactionManager(dataSource);
    if (null != transactionManagerCustomizers.getIfAvailable()) {
        transactionManagerCustomizers.getIfAvailable().customize(result);
    }
    return result;
}
 
Example #3
Source File: ShardingTransactionJDBCConfiguration.java    From opensharding-spi-impl with Apache License 2.0 5 votes vote down vote up
/**
 * Build hibernate transaction manager.
 *
 * @param transactionManagerCustomizers transaction manager customizers
 * @return jpa transaction manager
 */
@Bean
@ConditionalOnMissingBean(PlatformTransactionManager.class)
@ConditionalOnClass(value = LocalContainerEntityManagerFactoryBean.class, name = "javax.persistence.EntityManager")
public PlatformTransactionManager jpaTransactionManager(final ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
    JpaTransactionManager result = new JpaTransactionManager();
    if (null != transactionManagerCustomizers.getIfAvailable()) {
        transactionManagerCustomizers.getIfAvailable().customize(result);
    }
    return result;
}
 
Example #4
Source File: ShardingTransactionJDBCConfiguration.java    From opensharding-spi-impl with Apache License 2.0 5 votes vote down vote up
/**
 * Build datasource transaction manager.
 *
 * @param dataSource data source
 * @param transactionManagerCustomizers transaction manager customizers
 * @return datasource transaction manager
 */
@Bean
@ConditionalOnMissingBean(PlatformTransactionManager.class)
public PlatformTransactionManager dataSourceTransactionManager(final DataSource dataSource, final ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
    DataSourceTransactionManager result = new DataSourceTransactionManager(dataSource);
    if (null != transactionManagerCustomizers.getIfAvailable()) {
        transactionManagerCustomizers.getIfAvailable().customize(result);
    }
    return result;
}
 
Example #5
Source File: EclipseLinkJpaConfigForTest.java    From griffin with Apache License 2.0 5 votes vote down vote up
protected EclipseLinkJpaConfigForTest(
        DataSource ds,
        JpaProperties properties,
        ObjectProvider<JtaTransactionManager> jtm,
        ObjectProvider<TransactionManagerCustomizers> tmc) {
    super(ds, properties, jtm, tmc);
}
 
Example #6
Source File: JpaConfiguration.java    From tutorials with MIT License 4 votes vote down vote up
protected JpaConfiguration(DataSource dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManager, ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
    super(dataSource, properties, jtaTransactionManager, transactionManagerCustomizers);
}
 
Example #7
Source File: EclipseLinkJpaConfiguration.java    From txle with Apache License 2.0 4 votes vote down vote up
EclipseLinkJpaConfiguration(DataSource dataSource,
    JpaProperties properties,
    ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider,
    ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
  super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers);
}
 
Example #8
Source File: JpaConfiguration.java    From metron with Apache License 2.0 4 votes vote down vote up
protected JpaConfiguration(DataSource dataSource, JpaProperties properties, ObjectProvider<JtaTransactionManager> jtaTransactionManager, ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
  super(dataSource, properties, jtaTransactionManager, transactionManagerCustomizers);
}
 
Example #9
Source File: RepositoryApplicationConfiguration.java    From hawkbit with Eclipse Public License 1.0 4 votes vote down vote up
protected RepositoryApplicationConfiguration(final DataSource dataSource, final JpaProperties properties,
        final ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider,
        final ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
    super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers);
}
 
Example #10
Source File: ComposedTaskRunnerConfiguration.java    From spring-cloud-dataflow with Apache License 2.0 4 votes vote down vote up
@Bean
public BatchConfigurer getComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	return new org.springframework.cloud.dataflow.composedtaskrunner.ComposedBatchConfigurer(properties, dataSource, transactionManagerCustomizers);
}
 
Example #11
Source File: SpannerTransactionManagerAutoConfiguration.java    From spring-cloud-gcp with Apache License 2.0 4 votes vote down vote up
DatabaseClientTransactionManagerConfiguration(Supplier<DatabaseClient> databaseClientProvider,
		ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
	this.databaseClientProvider = databaseClientProvider;
	this.transactionManagerCustomizers = transactionManagerCustomizers
			.getIfAvailable();
}
 
Example #12
Source File: DatastoreTransactionManagerAutoConfiguration.java    From spring-cloud-gcp with Apache License 2.0 4 votes vote down vote up
DatastoreTransactionManagerConfiguration(DatastoreProvider datastore,
		ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
	this.datastore = datastore;
	this.transactionManagerCustomizers = transactionManagerCustomizers
			.getIfAvailable();
}
 
Example #13
Source File: Application.java    From cloud-s4-sdk-examples with Apache License 2.0 4 votes vote down vote up
protected Application(DataSource dataSource, JpaProperties properties,
                      ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider,
                      ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
    super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers);
}
 
Example #14
Source File: EclipseLinkJpaConfiguration.java    From servicecomb-pack with Apache License 2.0 4 votes vote down vote up
EclipseLinkJpaConfiguration(DataSource dataSource,
    JpaProperties properties,
    ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider,
    ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
  super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers);
}
 
Example #15
Source File: EclipseLinkJpaConfig.java    From griffin with Apache License 2.0 4 votes vote down vote up
protected EclipseLinkJpaConfig(
    DataSource ds, JpaProperties properties,
    ObjectProvider<JtaTransactionManager> jtm,
    ObjectProvider<TransactionManagerCustomizers> tmc) {
    super(ds, properties, jtm, tmc);
}
 
Example #16
Source File: ComposedTaskRunnerConfiguration.java    From composed-task-runner with Apache License 2.0 4 votes vote down vote up
@Bean
public BatchConfigurer getComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	return new ComposedBatchConfigurer(properties, dataSource, transactionManagerCustomizers);
}
 
Example #17
Source File: EclipseLinkJpaConfiguration.java    From servicecomb-saga-actuator with Apache License 2.0 4 votes vote down vote up
EclipseLinkJpaConfiguration(DataSource dataSource,
    JpaProperties properties,
    ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider,
    ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
  super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers);
}
 
Example #18
Source File: NarayanaConfiguration.java    From narayana-spring-boot with Apache License 2.0 4 votes vote down vote up
public NarayanaConfiguration(JtaProperties jtaProperties,
        ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
    this.jtaProperties = jtaProperties;
    this.transactionManagerCustomizers = transactionManagerCustomizers.getIfAvailable();
}
 
Example #19
Source File: ComposedBatchConfigurer.java    From composed-task-runner with Apache License 2.0 2 votes vote down vote up
/**
 * Create a new {@link BasicBatchConfigurer} instance.
 *
 * @param properties                    the batch properties
 * @param dataSource                    the underlying data source
 * @param transactionManagerCustomizers transaction manager customizers (or
 *                                      {@code null})
 */
protected ComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	super(properties, dataSource, transactionManagerCustomizers);
}
 
Example #20
Source File: ComposedBatchConfigurer.java    From spring-cloud-dataflow with Apache License 2.0 2 votes vote down vote up
/**
 * Create a new {@link BasicBatchConfigurer} instance.
 *
 * @param properties                    the batch properties
 * @param dataSource                    the underlying data source
 * @param transactionManagerCustomizers transaction manager customizers (or
 *                                      {@code null})
 */
protected ComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	super(properties, dataSource, transactionManagerCustomizers);
}