osdir.com

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (CALCITE-2702) Invalid commit()/rollback() behavior on JDBC connection


Dirk Mahler created CALCITE-2702:
------------------------------------

             Summary: Invalid commit()/rollback() behavior on JDBC connection
                 Key: CALCITE-2702
                 URL: https://issues.apache.org/jira/browse/CALCITE-2702
             Project: Calcite
          Issue Type: Bug
          Components: jdbc-adapter
    Affects Versions: 1.17.0
            Reporter: Dirk Mahler
            Assignee: Julian Hyde


We're using Tibco Spotfire with a Calcite enabled JDBC driver as a pooled datasource. There is an issue that the Spotfire connection pool rans out of connections quite fast and we could track it down to the behavior of org.apache.calcite.avatica.AvaticaConnection#commit. This delegates to org.apache.calcite.jdbc.CalciteMetaImpl#commit which throws an UnsupportedOperationException.

It looks like that this behavior is not correct: according to the JavaDoc of java.sql.DatabaseMetaData#supportsTransactions a JDBC driver should treat commit as a NOOP if the database (or in this case the driver) does not support transactions:
{noformat}
/**
* Retrieves whether this database supports transactions. If not, invoking the
* method <code>commit</code> is a noop, and the isolation level is
* <code>TRANSACTION_NONE</code>.
*
* @return <code>true</code> if transactions are supported;
* <code>false</code> otherwise
* @exception SQLException if a database access error occurs
*/
boolean supportsTransactions() throws SQLException;{noformat}
 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)