Skip to content

Commit 7aff575

Browse files
committed
Reintroduced original SpringSessionSynchronization constructor and made SpringSession/FlushSynchronization public (for GORM)
Issue: SPR-12400
1 parent 5f160c1 commit 7aff575

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringFlushSynchronization.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,7 +28,7 @@
2828
* @author Juergen Hoeller
2929
* @since 3.1
3030
*/
31-
class SpringFlushSynchronization extends TransactionSynchronizationAdapter {
31+
public class SpringFlushSynchronization extends TransactionSynchronizationAdapter {
3232

3333
private final Session session;
3434

‎spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/SpringSessionSynchronization.java‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* @author Juergen Hoeller
3434
* @since 3.1
3535
*/
36-
class SpringSessionSynchronization implements TransactionSynchronization, Ordered {
36+
public class SpringSessionSynchronization implements TransactionSynchronization, Ordered {
3737

3838
private final SessionHolder sessionHolder;
3939

@@ -44,12 +44,17 @@ class SpringSessionSynchronization implements TransactionSynchronization, Ordere
4444
private boolean holderActive = true;
4545

4646

47+
public SpringSessionSynchronization(SessionHolder sessionHolder, SessionFactory sessionFactory) {
48+
this(sessionHolder, sessionFactory, false);
49+
}
50+
4751
public SpringSessionSynchronization(SessionHolder sessionHolder, SessionFactory sessionFactory, boolean newSession) {
4852
this.sessionHolder = sessionHolder;
4953
this.sessionFactory = sessionFactory;
5054
this.newSession = newSession;
5155
}
5256

57+
5358
private Session getCurrentSession() {
5459
return this.sessionHolder.getSession();
5560
}

0 commit comments

Comments
 (0)