Example usage for org.springframework.transaction.annotation Propagation value

List of usage examples for org.springframework.transaction.annotation Propagation value

Introduction

In this page you can find the example usage for org.springframework.transaction.annotation Propagation value.

Prototype

int value

To view the source code for org.springframework.transaction.annotation Propagation value.

Click Source Link

Usage

From source file:com.eclecticlogic.pedal.impl.TransactionImpl.java

/**
 * @param propagation/*from   www . j  a  v a  2  s  .c  om*/
 * @return
 */
@Override
public TransactionRunner with(Propagation propagation) {
    if (propagation == Propagation.NOT_SUPPORTED) {
        throw new IllegalArgumentException(propagation.name());
    } else {
        DefaultTransactionDefinition transactionDefinition = new DefaultTransactionDefinition();
        transactionDefinition.setPropagationBehavior(propagation.value());
        localTransactionDefinition.get().push(transactionDefinition);
        return this;
    }
}