Uploaded image for project: 'Torque'
  1. Torque
  2. TORQUE-350

Make use of try-with-resources possible with Torque transactions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • 4.0
    • 5.0
    • Runtime, Templates
    • None

    Description

      We use the java.sql.Connection to wrap database operations into transactions. As of Java7, Connection is AutoCloseable. I propose to introduce a dynamic proxy to catch the close call and implement the pattern as described in https://db.apache.org/torque/torque-4.0/documentation/orm-reference/connections-transactions.html

      Attachments

        Activity

          People

            tv Thomas Vandahl
            tv Thomas Vandahl
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: