[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7022) AbstractMultiTenantConnectionProvider never closes connections causing resource exhaustion

Tomas Salfischberger (JIRA) noreply at atlassian.com
Mon Feb 6 04:40:14 EST 2012


AbstractMultiTenantConnectionProvider never closes connections causing resource exhaustion
------------------------------------------------------------------------------------------

                 Key: HHH-7022
                 URL: https://hibernate.onjira.com/browse/HHH-7022
             Project: Hibernate ORM
          Issue Type: Bug
          Components: core
    Affects Versions: 4.0.1
         Environment: Hibernate 4.0.1.Final, any database, but tested locally with MySQL 5.1.58
            Reporter: Tomas Salfischberger
            Priority: Critical


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:
{code}@Override
public void releaseConnection(String tenantIdentifier, Connection connection) throws SQLException {
	selectConnectionProvider( tenantIdentifier ).getConnection();
}{code}

Which opens a new connection anytime a connection is supposed to be closed and thus quickly exhausts all available connections.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list