Derby
  1. Derby
  2. DERBY-30

Connection.close() method inconsistently throws exception on closed connection

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.2.0
    • Fix Version/s: 10.0.2.0
    • Component/s: JDBC
    • Labels:
      None

      Description

      JDBC 3.0 Javadoc for java.sql.Connection.close() states

      "Calling the method close on a Connection object that is already closed is a no-op."

      In Derby embedded calling close on a closed connection from the DriverManager or EmbeddedDataSource incorrectly throws XJ012.

      Calling close on a closed connection from a ConnectionPoolDataSource or XADataSource for Derby correctly returns correctly (no-op).

      Similar issue for Statement.close() - needs to be a no-op on a closed Statement/PreparedStatement/CallableStatement

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        2d 18h 11m 1 Daniel John Debrunner 05/Oct/04 21:28
        Resolved Resolved Closed Closed
        242d 2h 5m 1 Daniel John Debrunner 04/Jun/05 23:34
        Gavin made changes -
        Workflow jira [ 37596 ] Default workflow, editable Closed status [ 12797316 ]
        Daniel John Debrunner made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Daniel John Debrunner made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 10.0.2.0 [ 10920 ]
        Resolution Fixed [ 1 ]
        Hide
        Daniel John Debrunner added a comment -

        Fixed by Committed revision 53822.

        Show
        Daniel John Debrunner added a comment - Fixed by Committed revision 53822.
        Daniel John Debrunner made changes -
        Field Original Value New Value
        Description JDBC 3.0 Javadoc for java.sql.Connection.close() states

        "Calling the method close on a Connection object that is already closed is a no-op."

        In Derby embedded calling close on a closed connection from the DriverManager or EmbeddedDataSource incorrectly throws XJ012.

        Calling close on a closed connection from a ConnectionPoolDataSource or XADataSource for Derby correctly returns correctly (no-op).
        JDBC 3.0 Javadoc for java.sql.Connection.close() states

        "Calling the method close on a Connection object that is already closed is a no-op."

        In Derby embedded calling close on a closed connection from the DriverManager or EmbeddedDataSource incorrectly throws XJ012.

        Calling close on a closed connection from a ConnectionPoolDataSource or XADataSource for Derby correctly returns correctly (no-op).

        Similar issue for Statement.close() - needs to be a no-op on a closed Statement/PreparedStatement/CallableStatement
        Daniel John Debrunner created issue -

          People

          • Assignee:
            Daniel John Debrunner
            Reporter:
            Daniel John Debrunner
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development