Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1071

Bug and fix in WrapperConnection.java

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • JBossAS-4.0.0 Final
    • JCA service
    • None

    Description

      SourceForge Submitter: simonpero .
      In WrappedConnection.java, function close(), if there
      are still opened Statements, the code goes through all
      of them, and closes them.
      However, in the Statement.close() function, the code
      unregisters the Statement from the connection, which
      changes the HashMap of statements. If you know a little
      bit about Collections, needless to tell you more: the
      HashMap raises a ConcurrentModificationException the
      next time you call next() on the HashMap's Iterator!!!

      The way to resolve this bug is easy: instead of closing a
      Statement while walking the HashMap, you put all the
      un-closed Statements in a List/Vector/Whatever, and
      you can then safely close them in a second loop...

      (Of course, this bug will never occur if one closes his
      own Statements, but not everyone can code
      appropriately...

      Attachments

        Activity

          People

            adrian.brock Adrian Brock (Inactive)
            sourceforge-user SourceForge legacy user (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: