@@ -720,10 +720,6 @@ protected void doCleanupAfterCompletion(Object transaction) {
720720 // Else, we need to rely on the connection pool to perform proper cleanup.
721721 try {
722722 Connection con = session .getJdbcCoordinator ().getLogicalConnection ().getPhysicalConnection ();
723- Integer previousHoldability = txObject .getPreviousHoldability ();
724- if (previousHoldability != null ) {
725- con .setHoldability (previousHoldability );
726- }
727723 DataSourceUtils .resetConnectionAfterTransaction (
728724 con , txObject .getPreviousIsolationLevel (), txObject .isReadOnly ());
729725 }
@@ -771,7 +767,7 @@ protected void disconnectOnCompletion(Session session) {
771767
772768 /**
773769 * Hibernate transaction object, representing a SessionHolder.
774- * Used as transaction object by HibernateTransactionManager.
770+ * <p> Used as transaction object by HibernateTransactionManager.
775771 */
776772 private class HibernateTransactionObject extends JdbcTransactionObjectSupport {
777773
@@ -783,8 +779,6 @@ private class HibernateTransactionObject extends JdbcTransactionObjectSupport {
783779
784780 private boolean needsConnectionReset ;
785781
786- private @ Nullable Integer previousHoldability ;
787-
788782 public void setSession (Session session ) {
789783 this .sessionHolder = new SessionHolder (session );
790784 this .newSessionHolder = true ;
@@ -828,14 +822,6 @@ public boolean needsConnectionReset() {
828822 return this .needsConnectionReset ;
829823 }
830824
831- public void setPreviousHoldability (@ Nullable Integer previousHoldability ) {
832- this .previousHoldability = previousHoldability ;
833- }
834-
835- public @ Nullable Integer getPreviousHoldability () {
836- return this .previousHoldability ;
837- }
838-
839825 public boolean hasSpringManagedTransaction () {
840826 return (this .sessionHolder != null && this .sessionHolder .getTransaction () != null );
841827 }
0 commit comments