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

The following examples show how to use org.springframework.boot.autoconfigure.transaction.TransactionManagerCustomizers. These examples are extracted from open source projects. 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
/**
 * 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
/**
 * 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
/**
 * 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
/**
 * 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 Project: griffin   Source File: EclipseLinkJpaConfigForTest.java    License: 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 Project: txle   Source File: EclipseLinkJpaConfiguration.java    License: 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 7
public NarayanaConfiguration(JtaProperties jtaProperties,
        ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
    this.jtaProperties = jtaProperties;
    this.transactionManagerCustomizers = transactionManagerCustomizers.getIfAvailable();
}
 
Example 8
EclipseLinkJpaConfiguration(DataSource dataSource,
    JpaProperties properties,
    ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider,
    ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
  super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers);
}
 
Example 9
@Bean
public BatchConfigurer getComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	return new ComposedBatchConfigurer(properties, dataSource, transactionManagerCustomizers);
}
 
Example 10
Source Project: griffin   Source File: EclipseLinkJpaConfig.java    License: 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 11
EclipseLinkJpaConfiguration(DataSource dataSource,
    JpaProperties properties,
    ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider,
    ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
  super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers);
}
 
Example 12
Source Project: cloud-s4-sdk-examples   Source File: Application.java    License: 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 13
DatastoreTransactionManagerConfiguration(DatastoreProvider datastore,
		ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
	this.datastore = datastore;
	this.transactionManagerCustomizers = transactionManagerCustomizers
			.getIfAvailable();
}
 
Example 14
DatabaseClientTransactionManagerConfiguration(Supplier<DatabaseClient> databaseClientProvider,
		ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
	this.databaseClientProvider = databaseClientProvider;
	this.transactionManagerCustomizers = transactionManagerCustomizers
			.getIfAvailable();
}
 
Example 15
@Bean
public BatchConfigurer getComposedBatchConfigurer(BatchProperties properties, DataSource dataSource, TransactionManagerCustomizers transactionManagerCustomizers) {
	return new org.springframework.cloud.dataflow.composedtaskrunner.ComposedBatchConfigurer(properties, dataSource, transactionManagerCustomizers);
}
 
Example 16
protected RepositoryApplicationConfiguration(final DataSource dataSource, final JpaProperties properties,
        final ObjectProvider<JtaTransactionManager> jtaTransactionManagerProvider,
        final ObjectProvider<TransactionManagerCustomizers> transactionManagerCustomizers) {
    super(dataSource, properties, jtaTransactionManagerProvider, transactionManagerCustomizers);
}
 
Example 17
Source Project: metron   Source File: JpaConfiguration.java    License: 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 18
Source Project: tutorials   Source File: JpaConfiguration.java    License: 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 19
/**
 * 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
/**
 * 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);
}