Removed deprecated transactionContext() from SharedSessionBuilder

Signed-off-by: Jan Schatteman <jschatte@redhat.com>
This commit is contained in:
Jan Schatteman 2022-03-02 23:36:10 +01:00 committed by Steve Ebersole
parent b8c416744d
commit 6564abe4c7
2 changed files with 4 additions and 16 deletions

View File

@ -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.
*

View File

@ -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();