Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2532

JDBC connection transaction/autocommit state is not restored when connections are closed

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: jdbc
    • Labels:
      None

      Description

      OpenJPA does not restore the autocommit property to it's original state before closing a connection, nor does it roll back or commit in-flight transactions.

      In JDBCStoreManager.begin() OpenJPA sets autocommit to true, but when closing the connection later in close() it simply delegates to Connection.close().

      This can create a problem with connection pools that do not automatically restore these settings when connections are returned, but instead rely on the client to clean up, for example tomcat-pool.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rheinen Ryan Heinen
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: