[teiid-commits] teiid SVN: r2604 - in branches/7.1.x: runtime/src/main/java/org/teiid/transport and 1 other directory.

teiid-commits at lists.jboss.org teiid-commits at lists.jboss.org
Fri Sep 24 14:58:17 EDT 2010


Author: rareddy
Date: 2010-09-24 14:58:17 -0400 (Fri, 24 Sep 2010)
New Revision: 2604

Modified:
   branches/7.1.x/client/src/main/java/org/teiid/client/BatchSerializer.java
   branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java
Log:
TEIID-1269: Marking IOExceptions to be logged at DETAIL level, and making BatchSerializer to throw RuntimeException if serialization does not match up.

Modified: branches/7.1.x/client/src/main/java/org/teiid/client/BatchSerializer.java
===================================================================
--- branches/7.1.x/client/src/main/java/org/teiid/client/BatchSerializer.java	2010-09-24 18:51:07 UTC (rev 2603)
+++ branches/7.1.x/client/src/main/java/org/teiid/client/BatchSerializer.java	2010-09-24 18:58:17 UTC (rev 2604)
@@ -34,6 +34,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.teiid.core.TeiidRuntimeException;
 import org.teiid.core.types.DataTypeManager;
 import org.teiid.jdbc.JDBCPlugin;
 
@@ -380,7 +381,7 @@
 	                            break objectSearch;
 	                        }
 	                    }
-	                    throw new IOException(JDBCPlugin.Util.getString("BatchSerializer.datatype_mismatch", new Object[] {types[i], new Integer(i), objectClass})); //$NON-NLS-1$
+	                    throw new TeiidRuntimeException(JDBCPlugin.Util.getString("BatchSerializer.datatype_mismatch", new Object[] {types[i], new Integer(i), objectClass})); //$NON-NLS-1$
 	                }
 	            }
             }

Modified: branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java
===================================================================
--- branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java	2010-09-24 18:51:07 UTC (rev 2603)
+++ branches/7.1.x/runtime/src/main/java/org/teiid/transport/SocketClientInstance.java	2010-09-24 18:58:17 UTC (rev 2604)
@@ -22,10 +22,10 @@
 
 package org.teiid.transport;
 
+import java.io.IOException;
 import java.io.Serializable;
 import java.net.InetSocketAddress;
 import java.net.SocketAddress;
-import java.net.SocketException;
 
 import org.teiid.client.security.ILogon;
 import org.teiid.core.crypto.CryptoException;
@@ -89,7 +89,7 @@
     }
 
 	public void exceptionOccurred(Throwable t) {
-		LogManager.log(t instanceof SocketException?MessageLevel.DETAIL:MessageLevel.ERROR, LogConstants.CTX_TRANSPORT, t, "Unhandled exception, closing client instance"); //$NON-NLS-1$
+		LogManager.log(t instanceof IOException?MessageLevel.DETAIL:MessageLevel.ERROR, LogConstants.CTX_TRANSPORT, t, "Unhandled exception, closing client instance"); //$NON-NLS-1$
 	}
 
 	public void onConnection() throws CommunicationException {



More information about the teiid-commits mailing list