Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10434

Cached connection manager debug forcing closed connections unexpectedly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 14.0.0.Beta2
    • None
    • None
    • None
    • Hide

      Using a version of Hibernate configured to obtain and keep connections for long periods (e.g. until transaction end instead of the default behavior for all current Hibernate releases which is to release connections immediately after use).

      An EJB method marked transaction REQUIRED calls another EJB method (via the remote interface) which is also marked REQUIRED. A connection is obtained by Hibernate within the "inner" REQUIRED method. Though the entity manager is valid and may be used later in the "outer" method, the connection obtained during the inner method is reported as leaked:

      ... IJ000100: Closing a connection for you. Please close them yourself: org.jboss.jca.adapters.jdbc.jdk8.WrappedConnectionJDK8...
      

      Subsequently, using the Hibernate entity manager fails due to the invalidation of the connection:

      ... java.sql.SQLException: IJ031040: Connection is not associated with a managed connection: org.jboss.jca.adapters.jdbc.jdk8.WrappedConnectionJDK8...
      

      Note this is NOT reproducible when either of the following are true:

      • Using the default configuration for current Hibernate releases (Hibernate 3 or later)
      • Using the EJB local interface to call the inner method
      Show
      Using a version of Hibernate configured to obtain and keep connections for long periods (e.g. until transaction end instead of the default behavior for all current Hibernate releases which is to release connections immediately after use). An EJB method marked transaction REQUIRED calls another EJB method (via the remote interface) which is also marked REQUIRED . A connection is obtained by Hibernate within the "inner" REQUIRED method. Though the entity manager is valid and may be used later in the "outer" method, the connection obtained during the inner method is reported as leaked: ... IJ000100: Closing a connection for you. Please close them yourself: org.jboss.jca.adapters.jdbc.jdk8.WrappedConnectionJDK8... Subsequently, using the Hibernate entity manager fails due to the invalidation of the connection: ... java.sql.SQLException: IJ031040: Connection is not associated with a managed connection: org.jboss.jca.adapters.jdbc.jdk8.WrappedConnectionJDK8... Note this is NOT reproducible when either of the following are true: Using the default configuration for current Hibernate releases (Hibernate 3 or later) Using the EJB local interface to call the inner method
    • Release Notes, Migration

    Description

      When cached connection manager (CCM) debug is enabled, during the stack unwind for EJB remote calls, CCM debug is reporting leaked connections and force-closing them.

      Attachments

        Issue Links

          Activity

            People

              flaviarnn Flavia Rainone
              rhn-support-sfikes Stephen Fikes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: