[
https://issues.apache.org/jira/browse/CALCITE-2702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16713367#comment-16713367
]
Stamatis Zampetakis commented on CALCITE-2702:
----------------------------------------------
[~julianhyde] DriverManager.getConnection returns a CalciteConnectionImpl and
from a quick look I don't see anything associated with the real connection to
the database. If I am not mistaken the real connection is obtained from the
DataSource inside JdbcSchema more or less at query time but I will look again.
Regarding the commit, If I am not misinterpreting the javadoc of
DatabaseMetaData, it should never throw.
> 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
> Priority: Major
>
> 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)