Removed deprecated transactionContext() from SharedSessionBuilder
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
parent
b8c416744d
commit
6564abe4c7
|
@ -15,18 +15,6 @@ import java.sql.Connection;
|
|||
*/
|
||||
public interface SharedSessionBuilder<T extends SharedSessionBuilder> extends SessionBuilder<T> {
|
||||
|
||||
/**
|
||||
* Signifies that the transaction context from the original session should be used to create the new session.
|
||||
*
|
||||
* @return {@code this}, for method chaining
|
||||
*
|
||||
* @deprecated Use {@link #connection()} instead
|
||||
*/
|
||||
@Deprecated
|
||||
default T transactionContext() {
|
||||
return connection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Signifies that the connection from the original session should be used to create the new session.
|
||||
*
|
||||
|
|
|
@ -49,7 +49,7 @@ public class SessionWithSharedConnectionTest {
|
|||
session.getTransaction().begin();
|
||||
|
||||
Session secondSession = session.sessionWithOptions()
|
||||
.transactionContext()
|
||||
.connection()
|
||||
.openSession();
|
||||
CriteriaBuilder criteriaBuilder = secondSession.getCriteriaBuilder();
|
||||
CriteriaQuery<IrrelevantEntity> criteria = criteriaBuilder.createQuery( IrrelevantEntity.class );
|
||||
|
@ -92,7 +92,7 @@ public class SessionWithSharedConnectionTest {
|
|||
// COMMIT ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Session secondSession = session.sessionWithOptions()
|
||||
.transactionContext()
|
||||
.connection()
|
||||
.autoClose( true )
|
||||
.openSession();
|
||||
|
||||
|
@ -116,7 +116,7 @@ public class SessionWithSharedConnectionTest {
|
|||
session.getTransaction().begin();
|
||||
|
||||
secondSession = session.sessionWithOptions()
|
||||
.transactionContext()
|
||||
.connection()
|
||||
.autoClose( true )
|
||||
.openSession();
|
||||
|
||||
|
@ -160,7 +160,7 @@ public class SessionWithSharedConnectionTest {
|
|||
session.getTransaction().begin();
|
||||
|
||||
Session secondSession = session.sessionWithOptions()
|
||||
.transactionContext()
|
||||
.connection()
|
||||
// .flushBeforeCompletion( true )
|
||||
.autoClose( true )
|
||||
.openSession();
|
||||
|
|
Loading…
Reference in New Issue