[
https://hibernate.onjira.com/browse/HHH-7022?page=com.atlassian.jira.plug...
]
Steve Ebersole closed HHH-7022.
-------------------------------
Resolution: Fixed
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
https://github.com/hibernate/hibernate-orm/commit/3ff0288da5f7d74f9fe9647...
Let's use this issue for change-log tracking :)
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
Assignee: Steve Ebersole
Labels: multi-tenancy
Fix For: 4.1.0
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