Connection leaks using legacy (non-JPA) Hibernate interface with JBoss managed JTA datasource pool in JBoss EAP 7
Issue
-
Configured
hibernate.cfg.xmlusing the following properties<property name="hibernate.connection.datasource">java:jboss/datasources/MyDS</property> <!-- jta="true" --> ... <property name="connection.autocommit">true</property> - Observed IJ000453 / IJ000655 errors
-
After enabling the cached connection manager debug facility, messages like the following are found in the
server.log... IJ000100: Closing a connection for you. Please close them yourself: org.jboss.jca.adapters.jdbc.jdk8.WrappedConnectionJDK8... at org.jboss.jca.core.connectionmanager.ccm.CachedConnectionManagerImpl.registerConnection(CachedConnectionManagerImpl.java:308) ... at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139) ... at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:162) at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1471)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7
- Hibernate 5
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
