You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2018/10/01 05:55:27 UTC
[17/21] ignite git commit: IGNITE-9621: JDBC thin: remove warning
about unsupported transactions.
IGNITE-9621: JDBC thin: remove warning about unsupported transactions.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/a7480909
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/a7480909
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/a7480909
Branch: refs/heads/ignite-gg-14206
Commit: a7480909b50f6421e84877654e9f0f56c587cd2a
Parents: 37eedfc
Author: devozerov <vo...@gridgain.com>
Authored: Fri Sep 28 18:09:22 2018 +0300
Committer: devozerov <vo...@gridgain.com>
Committed: Fri Sep 28 18:09:22 2018 +0300
----------------------------------------------------------------------
.../internal/jdbc/thin/JdbcThinConnection.java | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/a7480909/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
index 547b1db..323a410 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/jdbc/thin/JdbcThinConnection.java
@@ -234,7 +234,7 @@ public class JdbcThinConnection implements Connection {
int resSetHoldability) throws SQLException {
ensureNotClosed();
- checkCursorOptions(resSetType, resSetConcurrency, resSetHoldability);
+ checkCursorOptions(resSetType, resSetConcurrency);
JdbcThinStatement stmt = new JdbcThinStatement(this, resSetHoldability, schema);
@@ -264,7 +264,7 @@ public class JdbcThinConnection implements Connection {
int resSetHoldability) throws SQLException {
ensureNotClosed();
- checkCursorOptions(resSetType, resSetConcurrency, resSetHoldability);
+ checkCursorOptions(resSetType, resSetConcurrency);
if (sql == null)
throw new SQLException("SQL string cannot be null.");
@@ -284,19 +284,14 @@ public class JdbcThinConnection implements Connection {
/**
* @param resSetType Cursor option.
* @param resSetConcurrency Cursor option.
- * @param resSetHoldability Cursor option.
* @throws SQLException If options unsupported.
*/
- private void checkCursorOptions(int resSetType, int resSetConcurrency,
- int resSetHoldability) throws SQLException {
+ private void checkCursorOptions(int resSetType, int resSetConcurrency) throws SQLException {
if (resSetType != TYPE_FORWARD_ONLY)
throw new SQLFeatureNotSupportedException("Invalid result set type (only forward is supported).");
if (resSetConcurrency != CONCUR_READ_ONLY)
throw new SQLFeatureNotSupportedException("Invalid concurrency (updates are not supported).");
-
- if (resSetHoldability != HOLD_CURSORS_OVER_COMMIT)
- LOG.warning("Transactions are not supported.");
}
/** {@inheritDoc} */
@@ -441,10 +436,6 @@ public class JdbcThinConnection implements Connection {
case Connection.TRANSACTION_READ_COMMITTED:
case Connection.TRANSACTION_REPEATABLE_READ:
case Connection.TRANSACTION_SERIALIZABLE:
- LOG.warning("Transactions are not supported.");
-
- break;
-
case Connection.TRANSACTION_NONE:
break;
@@ -459,8 +450,6 @@ public class JdbcThinConnection implements Connection {
@Override public int getTransactionIsolation() throws SQLException {
ensureNotClosed();
- LOG.warning("Transactions are not supported.");
-
return txIsolation;
}
@@ -494,9 +483,6 @@ public class JdbcThinConnection implements Connection {
@Override public void setHoldability(int holdability) throws SQLException {
ensureNotClosed();
- if (holdability != HOLD_CURSORS_OVER_COMMIT)
- LOG.warning("Transactions are not supported.");
-
if (holdability != HOLD_CURSORS_OVER_COMMIT && holdability != CLOSE_CURSORS_AT_COMMIT)
throw new SQLException("Invalid result set holdability value.");