Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2008 the original author or authors.
|
* Copyright 2002-2014 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -23,7 +23,7 @@ import org.springframework.util.Assert;
|
|||||||
/**
|
/**
|
||||||
* Abstract base class for {@link DataFieldMaxValueIncrementer} implementations that use
|
* Abstract base class for {@link DataFieldMaxValueIncrementer} implementations that use
|
||||||
* a column in a custom sequence table. Subclasses need to provide the specific handling
|
* a column in a custom sequence table. Subclasses need to provide the specific handling
|
||||||
* of that table in their {@link #getNextKey()} implementation..
|
* of that table in their {@link #getNextKey()} implementation.
|
||||||
*
|
*
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
* @since 2.5.3
|
* @since 2.5.3
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import javax.sql.DataSource;
|
|||||||
*
|
*
|
||||||
* <p>Example:
|
* <p>Example:
|
||||||
*
|
*
|
||||||
* <pre class="code"> create table tab (id int not null primary key, text varchar(100))
|
* <pre class="code">create table tab (id int not null primary key, text varchar(100))
|
||||||
* create table tab_sequence (id bigint identity)
|
* create table tab_sequence (id bigint identity)
|
||||||
* insert into tab_sequence values(DEFAULT)</pre>
|
* insert into tab_sequence values(DEFAULT)</pre>
|
||||||
*
|
*
|
||||||
@@ -73,6 +73,7 @@ public class SybaseAnywhereMaxValueIncrementer extends SybaseMaxValueIncrementer
|
|||||||
super(dataSource, incrementerName, columnName);
|
super(dataSource, incrementerName, columnName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected String getIncrementStatement() {
|
protected String getIncrementStatement() {
|
||||||
return "insert into " + getIncrementerName() + " values(DEFAULT)";
|
return "insert into " + getIncrementerName() + " values(DEFAULT)";
|
||||||
|
|||||||
@@ -361,7 +361,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
|||||||
}
|
}
|
||||||
else if (definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_REQUIRED ||
|
else if (definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_REQUIRED ||
|
||||||
definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_REQUIRES_NEW ||
|
definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_REQUIRES_NEW ||
|
||||||
definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_NESTED) {
|
definition.getPropagationBehavior() == TransactionDefinition.PROPAGATION_NESTED) {
|
||||||
SuspendedResourcesHolder suspendedResources = suspend(null);
|
SuspendedResourcesHolder suspendedResources = suspend(null);
|
||||||
if (debugEnabled) {
|
if (debugEnabled) {
|
||||||
logger.debug("Creating new transaction with name [" + definition.getName() + "]: " + definition);
|
logger.debug("Creating new transaction with name [" + definition.getName() + "]: " + definition);
|
||||||
@@ -531,7 +531,7 @@ public abstract class AbstractPlatformTransactionManager implements PlatformTran
|
|||||||
if (status.isNewSynchronization()) {
|
if (status.isNewSynchronization()) {
|
||||||
TransactionSynchronizationManager.setActualTransactionActive(status.hasTransaction());
|
TransactionSynchronizationManager.setActualTransactionActive(status.hasTransaction());
|
||||||
TransactionSynchronizationManager.setCurrentTransactionIsolationLevel(
|
TransactionSynchronizationManager.setCurrentTransactionIsolationLevel(
|
||||||
(definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT) ?
|
definition.getIsolationLevel() != TransactionDefinition.ISOLATION_DEFAULT ?
|
||||||
definition.getIsolationLevel() : null);
|
definition.getIsolationLevel() : null);
|
||||||
TransactionSynchronizationManager.setCurrentTransactionReadOnly(definition.isReadOnly());
|
TransactionSynchronizationManager.setCurrentTransactionReadOnly(definition.isReadOnly());
|
||||||
TransactionSynchronizationManager.setCurrentTransactionName(definition.getName());
|
TransactionSynchronizationManager.setCurrentTransactionName(definition.getName());
|
||||||
|
|||||||
Reference in New Issue
Block a user