Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1426

Changing readonly after autocommitt set to false fails with C-JDBC Driver

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Obsolete
    • Icon: Optional Optional
    • No Release
    • JBossAS-4.0.1 Final
    • JCA service
    • None

      In the C-JDBC JDBC Connection driver it uses autoCommit=false to determine if it is in a transaction when changing readOnly.

      Unfortunatly LocalManagedConnection sets autoCommit=false prior to "checkState()" which synchronizes the readOnly property with the underlying connection. This approach works fine with most JDBC drivers with but not with C-JDBC. Looking at the JDBC 3 spec (10.1) JDBC says:

      "Typically, a new transaction is started when the current SQL statement requires one and there is
      no transaction already in place."

      The key word being "Typically". So it appears that it may be within C-JDBC's right to declare a transaction started once setAutoCommit=false.

      So, would there be any problem with changing LocalManagedConnection.begin() to call checkState() prior to setting autoCommit in the underlying connection?

      Mike

              Unassigned Unassigned
              youngm_jira youngm (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: