Java 类org.springframework.transaction.InvalidTimeoutException 实例源码

项目:lams    文件:AbstractPlatformTransactionManager.java   
/**
 * Specify the default timeout that this transaction manager should apply
 * if there is no timeout specified at the transaction level, in seconds.
 * <p>Default is the underlying transaction infrastructure's default timeout,
 * e.g. typically 30 seconds in case of a JTA provider, indicated by the
 * {@code TransactionDefinition.TIMEOUT_DEFAULT} value.
 * @see org.springframework.transaction.TransactionDefinition#TIMEOUT_DEFAULT
 */
public final void setDefaultTimeout(int defaultTimeout) {
    if (defaultTimeout < TransactionDefinition.TIMEOUT_DEFAULT) {
        throw new InvalidTimeoutException("Invalid default timeout", defaultTimeout);
    }
    this.defaultTimeout = defaultTimeout;
}
项目:spring4-understanding    文件:AbstractPlatformTransactionManager.java   
/**
 * Specify the default timeout that this transaction manager should apply
 * if there is no timeout specified at the transaction level, in seconds.
 * <p>Default is the underlying transaction infrastructure's default timeout,
 * e.g. typically 30 seconds in case of a JTA provider, indicated by the
 * {@code TransactionDefinition.TIMEOUT_DEFAULT} value.
 * @see org.springframework.transaction.TransactionDefinition#TIMEOUT_DEFAULT
 */
public final void setDefaultTimeout(int defaultTimeout) {
    if (defaultTimeout < TransactionDefinition.TIMEOUT_DEFAULT) {
        throw new InvalidTimeoutException("Invalid default timeout", defaultTimeout);
    }
    this.defaultTimeout = defaultTimeout;
}
项目:class-guard    文件:AbstractPlatformTransactionManager.java   
/**
 * Specify the default timeout that this transaction manager should apply
 * if there is no timeout specified at the transaction level, in seconds.
 * <p>Default is the underlying transaction infrastructure's default timeout,
 * e.g. typically 30 seconds in case of a JTA provider, indicated by the
 * {@code TransactionDefinition.TIMEOUT_DEFAULT} value.
 * @see org.springframework.transaction.TransactionDefinition#TIMEOUT_DEFAULT
 */
public final void setDefaultTimeout(int defaultTimeout) {
    if (defaultTimeout < TransactionDefinition.TIMEOUT_DEFAULT) {
        throw new InvalidTimeoutException("Invalid default timeout", defaultTimeout);
    }
    this.defaultTimeout = defaultTimeout;
}