The connection handling mode passed to this method is only ever used to log something at the debug level. Other than that, it has no effect whatsoever.
I believe it should be retrieved in org.hibernate.internal.JdbcSessionContextImpl#JdbcSessionContextImpl to initialize the field connectionHandlingMode instead.