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

SQLException not reported from Batched statement

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: jdbc
    • Labels:
      None

      Description

      Batched update resulted in SQLException was not propagated back to application.

        Activity

        Hide
        fancy Catalina Wei added a comment -

        fix checked in under r666512

        Show
        fancy Catalina Wei added a comment - fix checked in under r666512
        Hide
        allee8285 Albert Lee added a comment -

        The previous fixes did not completely correct the problem scenario.

        In AbstractUpdateManager.flush(), it keeps track of 2 exception collections, one as a local variable in flush() and the 2nd one maintained by the prepare statement manger. These 2 collections are combined into a single collection and returned by flush().

        This approach caused the return collection not maintaining the order of exceptions took place during the flush. Typically the first exception contains the relevant information about the cause of failure and it allows the application to examine the cause and perform appropriate recovery action.

        Albert Lee.

        Show
        allee8285 Albert Lee added a comment - The previous fixes did not completely correct the problem scenario. In AbstractUpdateManager.flush(), it keeps track of 2 exception collections, one as a local variable in flush() and the 2nd one maintained by the prepare statement manger. These 2 collections are combined into a single collection and returned by flush(). This approach caused the return collection not maintaining the order of exceptions took place during the flush. Typically the first exception contains the relevant information about the cause of failure and it allows the application to examine the cause and perform appropriate recovery action. Albert Lee.

          People

          • Assignee:
            allee8285 Albert Lee
            Reporter:
            fancy Catalina Wei
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development