jakarta-jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r582393 - /jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
Date Fri, 05 Oct 2007 21:14:38 GMT
Author: sebb
Date: Fri Oct  5 14:14:37 2007
New Revision: 582393

URL: http://svn.apache.org/viewvc?rev=582393&view=rev
Log:
No need to log SQL errors

Modified:
    jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java

Modified: jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java?rev=582393&r1=582392&r2=582393&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
(original)
+++ jakarta/jmeter/trunk/src/protocol/jdbc/org/apache/jmeter/protocol/jdbc/sampler/JDBCSampler.java
Fri Oct  5 14:14:37 2007
@@ -26,12 +26,10 @@
 import java.sql.ResultSetMetaData;
 import java.sql.SQLException;
 import java.sql.Statement;
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
-import java.util.List;
 import java.util.Map;
 
 import org.apache.jmeter.protocol.jdbc.config.DataSourceElement;
@@ -111,6 +109,7 @@
 	 *  from the least recently used connections.  
 	 */
 	private static Map perConnCache = new LinkedHashMap(MAX_ENTRIES){
+		private static final long serialVersionUID = 1L;
 		protected boolean removeEldestEntry(java.util.Map.Entry arg0) {
 			if (size() > MAX_ENTRIES) {
 				final Object value = arg0.getValue();
@@ -210,12 +209,8 @@
 
 		} catch (SQLException ex) {
 			final String errCode = Integer.toString(ex.getErrorCode());
-			log.error("SQLstate: "+ex.getSQLState()+
-					" SQLcode: "+errCode+
-					" Message: "+ex.getMessage(),
-					ex);
 			res.setResponseMessage(ex.toString());
-			res.setResponseCode(errCode);
+			res.setResponseCode(ex.getSQLState()+ " " +errCode);
 			res.setSuccessful(false);
 		} finally {
 			close(stmt);



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org


Mime
View raw message