Java Code Examples for org.springframework.transaction.support.ResourceTransactionManager

The following examples show how to use org.springframework.transaction.support.ResourceTransactionManager. 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
@Override
public void initialize() {
	// Set sessionTransacted=true in case of a non-JTA transaction manager.
	if (!this.sessionTransactedCalled &&
			this.transactionManager instanceof ResourceTransactionManager &&
			!TransactionSynchronizationUtils.sameResourceFactory(
					(ResourceTransactionManager) this.transactionManager, obtainConnectionFactory())) {
		super.setSessionTransacted(true);
	}

	// Use bean name as default transaction name.
	if (this.transactionDefinition.getName() == null) {
		String beanName = getBeanName();
		if (beanName != null) {
			this.transactionDefinition.setName(beanName);
		}
	}

	// Proceed with superclass initialization.
	super.initialize();
}
 
Example 2
@Override
public void initialize() {
	// Set sessionTransacted=true in case of a non-JTA transaction manager.
	if (!this.sessionTransactedCalled &&
			this.transactionManager instanceof ResourceTransactionManager &&
			!TransactionSynchronizationUtils.sameResourceFactory(
					(ResourceTransactionManager) this.transactionManager, obtainConnectionFactory())) {
		super.setSessionTransacted(true);
	}

	// Use bean name as default transaction name.
	if (this.transactionDefinition.getName() == null) {
		String beanName = getBeanName();
		if (beanName != null) {
			this.transactionDefinition.setName(beanName);
		}
	}

	// Proceed with superclass initialization.
	super.initialize();
}
 
Example 3
@Override
public void initialize() {
	// Set sessionTransacted=true in case of a non-JTA transaction manager.
	if (!this.sessionTransactedCalled &&
			this.transactionManager instanceof ResourceTransactionManager &&
			!TransactionSynchronizationUtils.sameResourceFactory(
					(ResourceTransactionManager) this.transactionManager, getConnectionFactory())) {
		super.setSessionTransacted(true);
	}

	// Use bean name as default transaction name.
	if (this.transactionDefinition.getName() == null) {
		this.transactionDefinition.setName(getBeanName());
	}

	// Proceed with superclass initialization.
	super.initialize();
}