IJ000100: Closing a connection for you. Please close them yourself
sourabhtech Feb 8, 2016 9:20 AMHi,
Can someone help us to identify the root cause of below issue?
Our application received below error while getting new database connection from pool.
00:25:03,377 INFO [org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager] (pool-8-thread-1) IJ000100: Closing a connection for you. Please close them yourself: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6@5176d1f2: java.lang.Throwable: STACKTRACE
- Our application creates database connection using jndi-name “java:/MySQLDS”.
“standalone.xml” file connection/jca settings:
<logger category="org.jboss.jca">
<level name="DEBUG"/>
</logger>
---------------
---------------
<datasource jta="true" jndi-name="java:/MySQLDS" pool-name="MySQLDS" enabled="true" use-ccm="true">
<connection-url>jdbc:mysql://myhost:3306/mydatabase?autoReconnect=true</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver>mysql</driver>
<pool>
<min-pool-size>2</min-pool-size>
<max-pool-size>2</max-pool-size>
</pool>
----------------
----------------
- “persistence.xml” settings:
-----------------------
<persistence-unit name="MySQLDS">
<jta-data-source>java:/MySQLDS</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
</properties>
</persistence-unit>
---------------------
- EntityManager populates in Stateless session bean in following way:
@PersistenceContext(unitName = "MySQLDS")
protected transient EntityManager entityManager;
- Queries or stored procedure execute using below statements:
Query query = entityManager.createNativeQuery(queryStr);
OR
Query query = entityManager.createNativeQuery(queryStr,
EntityClass.class);
OR
Connection conn = ((SessionImpl) entityManager.getDelegate()).connection();
cstmt = conn.prepareCall("{call proc_performtask(?,?,?,?)}");
cstmt.executeUpdate();
String retData = cstmt.getString(4);
Please note that application never closed the connection manually (conn.closed() statement never used). Furthermore, the issue was noticed specially when application perform some task using stored procedure i.e. while executing "((SessionImpl) entityManager.getDelegate()).connection()" statement. Furthermore, application never received error "pool exhausted".
Please see attached server logs for detailed error logging and suggest us how resolve it. Please let us know if you require more info.
Best Regards
Sourabh Goel
-
server.log.2016-01-30.zip 43.9 KB