Polishing (includes varargs for selected setters)

This commit is contained in:
Juergen Hoeller
2014-08-11 22:12:26 +02:00
parent 6639320e8e
commit 36918d6bb7
44 changed files with 482 additions and 490 deletions

View File

@@ -91,6 +91,9 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
* support nested transactions! Hence, do not expect Hibernate access code to
* semantically participate in a nested transaction.</i>
*
* <p><b>NOTE: Hibernate 4.2+ is strongly recommended for efficient transaction
* management with Spring, in particular for transactional Spring JDBC access.</b>
*
* @author Juergen Hoeller
* @since 3.1
* @see #setSessionFactory
@@ -434,7 +437,7 @@ public class HibernateTransactionManager extends AbstractPlatformTransactionMana
throw new InvalidIsolationLevelException(
"HibernateTransactionManager is not allowed to support custom isolation levels: " +
"make sure that its 'prepareConnection' flag is on (the default) and that the " +
"Hibernate connection release mode is set to 'on_close' (SpringTransactionFactory's default).");
"Hibernate connection release mode is set to 'on_close' (the default for JDBC).");
}
if (logger.isDebugEnabled()) {
logger.debug("Not preparing JDBC Connection of Hibernate Session [" + session + "]");

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -70,8 +70,8 @@ public class SpringSessionContext implements CurrentSessionContext {
else if (value instanceof SessionHolder) {
SessionHolder sessionHolder = (SessionHolder) value;
Session session = sessionHolder.getSession();
if (TransactionSynchronizationManager.isSynchronizationActive() &&
!sessionHolder.isSynchronizedWithTransaction()) {
if (!sessionHolder.isSynchronizedWithTransaction() &&
TransactionSynchronizationManager.isSynchronizationActive()) {
TransactionSynchronizationManager.registerSynchronization(
new SpringSessionSynchronization(sessionHolder, this.sessionFactory));
sessionHolder.setSynchronizedWithTransaction(true);