AbstractMultiTenantConnectionProvider never closes connections causing resource exhaustion
Description
In org.hibernate.service.jdbc.connections.spi.AbstractMultiTenantConnectionProvider the call to releaseConnection(String tenantIdentifier, Connection connection) does not actually close the connection. The method was probably copied from getConnection(String tenantIdentifier) resulting in this code:
Which opens a new connection anytime a connection is supposed to be closed and thus quickly exhausts all available connections.
But, I messed up with labeling it under HHH-5697; I did not notice its fix-for version. The exact commit that addressed this is 3ff0288da5f7d74f9fe964712a7ae869aee69bfd
In org.hibernate.service.jdbc.connections.spi.AbstractMultiTenantConnectionProvider the call to releaseConnection(String tenantIdentifier, Connection connection) does not actually close the connection. The method was probably copied from getConnection(String tenantIdentifier) resulting in this code:
Which opens a new connection anytime a connection is supposed to be closed and thus quickly exhausts all available connections.