Reintroduced original SpringSessionSynchronization constructor and made SpringSession/FlushSynchronization public (for GORM)
Issue: SPR-12400
This commit is contained in:
@@ -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.
|
||||
@@ -28,7 +28,7 @@ import org.springframework.transaction.support.TransactionSynchronizationAdapter
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.1
|
||||
*/
|
||||
class SpringFlushSynchronization extends TransactionSynchronizationAdapter {
|
||||
public class SpringFlushSynchronization extends TransactionSynchronizationAdapter {
|
||||
|
||||
private final Session session;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.transaction.support.TransactionSynchronizationManager
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.1
|
||||
*/
|
||||
class SpringSessionSynchronization implements TransactionSynchronization, Ordered {
|
||||
public class SpringSessionSynchronization implements TransactionSynchronization, Ordered {
|
||||
|
||||
private final SessionHolder sessionHolder;
|
||||
|
||||
@@ -44,12 +44,17 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere
|
||||
private boolean holderActive = true;
|
||||
|
||||
|
||||
public SpringSessionSynchronization(SessionHolder sessionHolder, SessionFactory sessionFactory) {
|
||||
this(sessionHolder, sessionFactory, false);
|
||||
}
|
||||
|
||||
public SpringSessionSynchronization(SessionHolder sessionHolder, SessionFactory sessionFactory, boolean newSession) {
|
||||
this.sessionHolder = sessionHolder;
|
||||
this.sessionFactory = sessionFactory;
|
||||
this.newSession = newSession;
|
||||
}
|
||||
|
||||
|
||||
private Session getCurrentSession() {
|
||||
return this.sessionHolder.getSession();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user