[teiid-commits] teiid SVN: r2631 - branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Wed Oct 6 13:07:09 EDT 2010


Author: shawkins
Date: 2010-10-06 13:07:08 -0400 (Wed, 06 Oct 2010)
New Revision: 2631

Modified:
   branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java
Log:
TEIID-1292 catching the sqlexception from setting the fetch size.

Modified: branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java
===================================================================
--- branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java	2010-10-06 15:30:16 UTC (rev 2630)
+++ branches/7.1.x/connectors/translator-jdbc/src/main/java/org/teiid/translator/jdbc/JDBCBaseExecution.java	2010-10-06 17:07:08 UTC (rev 2631)
@@ -134,8 +134,14 @@
         }
     }
 
-    protected void setSizeContraints(Statement statement) throws SQLException {
-    	statement.setFetchSize(fetchSize);
+    protected void setSizeContraints(Statement statement) {
+    	try {
+			statement.setFetchSize(fetchSize);
+		} catch (SQLException e) {
+			if (LogManager.isMessageToBeRecorded(LogConstants.CTX_CONNECTOR, MessageLevel.DETAIL)) {
+    			LogManager.logDetail(LogConstants.CTX_CONNECTOR, context.getRequestIdentifier(), " could not set fetch size: ", fetchSize); //$NON-NLS-1$
+    		}
+		}
     }
 
     protected synchronized Statement getStatement() throws SQLException {
@@ -185,7 +191,7 @@
     		warning = toAdd.getNextWarning();
     		toAdd.setNextException(null);
     		if (LogManager.isMessageToBeRecorded(LogConstants.CTX_CONNECTOR, MessageLevel.DETAIL)) {
-    			LogManager.logDetail(context.getRequestIdentifier() + " Warning: ", warning); //$NON-NLS-1$
+    			LogManager.logDetail(LogConstants.CTX_CONNECTOR, context.getRequestIdentifier() + " Warning: ", warning); //$NON-NLS-1$
     		}
     		context.addWarning(toAdd);
     	}



More information about the teiid-commits mailing list