HHH-13976 Some javadoc clarifications and code style adjustments

This commit is contained in:
Sanne Grinovero 2020-04-30 14:31:00 +01:00
parent dd6ebda110
commit fcc5c150c0
4 changed files with 6 additions and 8 deletions

View File

@ -444,10 +444,8 @@ public class JdbcCoordinatorImpl implements JdbcCoordinator {
@Override
public void beforeTransactionCompletion() {
owner.beforeTransactionCompletion();
if ( getConnectionReleaseMode() == ConnectionReleaseMode.BEFORE_TRANSACTION_COMPLETION ) {
this.logicalConnection.beforeTransactionCompletion();
}
this.owner.beforeTransactionCompletion();
this.logicalConnection.beforeTransactionCompletion();
}
@Override

View File

@ -152,7 +152,6 @@ public class LogicalConnectionManagedImpl extends AbstractLogicalConnectionImple
@Override
public void beforeTransactionCompletion() {
super.beforeTransactionCompletion();
if ( connectionHandlingMode.getReleaseMode() == ConnectionReleaseMode.BEFORE_TRANSACTION_COMPLETION ) {
log.debug( "Initiating JDBC connection release from beforeTransactionCompletion" );
releaseConnection();

View File

@ -36,8 +36,9 @@ public interface LogicalConnectionImplementor extends LogicalConnection {
void afterStatement();
/**
* Notification indicating a transaction is about to completed to trigger
* {@link org.hibernate.ConnectionReleaseMode#BEFORE_TRANSACTION_COMPLETION} releasing if needed
* Notification indicating a transaction is about to be completed, so to trigger
* releasing of the connection if needed ({@link org.hibernate.ConnectionReleaseMode#BEFORE_TRANSACTION_COMPLETION}
* is enabled)
*/
void beforeTransactionCompletion();

View File

@ -43,7 +43,7 @@ public class BeforeCompletionReleaseTest extends BaseEntityManagerFunctionalTest
@Override
protected Map getConfig() {
Map config = super.getConfig();
Map config = super.getConfig();
TestingJtaBootstrap.prepare( config );
config.put( AvailableSettings.CONNECTION_PROVIDER, new ConnectionProviderDecorator() );
config.put( AvailableSettings.CONNECTION_HANDLING, PhysicalConnectionHandlingMode.DELAYED_ACQUISITION_AND_RELEASE_BEFORE_TRANSACTION_COMPLETION );