Uploaded image for project: 'Commons DBCP'
  1. Commons DBCP
  2. DBCP-308

ORA-01453: SET TRANSACTION must be first command of transaction exception with SharedPoolDataSource

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.2
    • Fix Version/s: 1.3, 1.4
    • Labels:
      None
    • Environment:

      JDK 1.5

      Description

      When using SharedPoolDataSource I get ORA-01453: SET TRANSACTION exception on con.setReadOnly(isDefaultReadOnly()); in setupDefaults method
      I correct it with code -

      protected void setupDefaults(Connection con, String username) throws SQLException {
      con.rollback();
      con.setReadOnly(isDefaultReadOnly());
      con.setAutoCommit(isDefaultAutoCommit());
      int defaultTransactionIsolation = getDefaultTransactionIsolation();
      if (defaultTransactionIsolation != UNKNOWN_TRANSACTIONISOLATION)

      { con.setTransactionIsolation(defaultTransactionIsolation); }

      }

      rollback is important, without it it ends on same exception ...
      I'm using 10.1.2.0.2 oracle driver

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              barkh Ondrej Tisler
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: