Example usage for org.springframework.transaction.support TransactionTemplate afterPropertiesSet

List of usage examples for org.springframework.transaction.support TransactionTemplate afterPropertiesSet

Introduction

In this page you can find the example usage for org.springframework.transaction.support TransactionTemplate afterPropertiesSet.

Prototype

@Override
    public void afterPropertiesSet() 

Source Link

Usage

From source file:org.fcrepo.camel.FcrepoEndpoint.java

/**
 * Create a template for use in transactions
 *
 * @return a transaction template/* www. j a  v a2 s.  c o m*/
 */
public TransactionTemplate createTransactionTemplate() {
    final TransactionTemplate transactionTemplate;

    if (getTransactionManager() != null) {
        transactionTemplate = new TransactionTemplate(getTransactionManager());
    } else {
        final FcrepoTransactionManager txMgr = new FcrepoTransactionManager();
        txMgr.setBaseUrl(getBaseUrlWithScheme());
        txMgr.setAuthUsername(getAuthUsername());
        txMgr.setAuthPassword(getAuthPassword());
        txMgr.setAuthHost(getAuthHost());
        transactionTemplate = new TransactionTemplate(txMgr);
    }
    transactionTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);
    transactionTemplate.afterPropertiesSet();
    return transactionTemplate;
}

From source file:org.jasig.portal.events.aggr.PortalEventAggregationManagerImpl.java

@Autowired
public void setAggrEventsPlatformTransactionManager(
        @Qualifier("aggrEvents") PlatformTransactionManager transactionManager) {
    final TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager);
    transactionTemplate.afterPropertiesSet();
    this.aggrEventsTransactionOperations = transactionTemplate;
}

From source file:org.springframework.session.jdbc.JdbcOperationsSessionRepository.java

private static TransactionTemplate createTransactionTemplate(PlatformTransactionManager transactionManager) {
    TransactionTemplate transactionTemplate = new TransactionTemplate(transactionManager);
    transactionTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
    transactionTemplate.afterPropertiesSet();
    return transactionTemplate;
}