0 Replies Latest reply on Feb 8, 2016 9:20 AM by sourabhtech

    IJ000100: Closing a connection for you. Please close them yourself




      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"/>




      <datasource jta="true" jndi-name="java:/MySQLDS" pool-name="MySQLDS" enabled="true" use-ccm="true">











      • “persistence.xml” settings:



      <persistence-unit name="MySQLDS">



                                                      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />




      • 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);


             Query query = entityManager.createNativeQuery(queryStr,



            Connection conn = ((SessionImpl) entityManager.getDelegate()).connection();

      cstmt = conn.prepareCall("{call proc_performtask(?,?,?,?)}");


                      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