db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r639073 - /db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
Date Wed, 19 Mar 2008 23:27:50 GMT
Author: kmarsden
Date: Wed Mar 19 16:27:47 2008
New Revision: 639073

URL: http://svn.apache.org/viewvc?rev=639073&view=rev
Log:
DERBY-3513 NullPointerException in newBrokeredStatement in app server environment

Put in change to assign jdbcLevel to local variable.  This seemed to reduce the
frequency of this issue in IBM 1.5.  


Modified:
    db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java

Modified: db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java?rev=639073&r1=639072&r2=639073&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
(original)
+++ db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/jdbc/BrokeredConnection.java
Wed Mar 19 16:27:47 2008
@@ -445,13 +445,22 @@
 	}
 
 	public BrokeredStatement newBrokeredStatement(BrokeredStatementControl statementControl)
throws SQLException {
-		return new BrokeredStatement(statementControl, getJDBCLevel());
+		// DERBY-3513 - Possible IBM 1.5 JIT bug workaround.
+		// create local variable for jdbcLevel
+		int jdbcLevel = getJDBCLevel();
+		return new BrokeredStatement(statementControl, jdbcLevel);
 	}
 	public BrokeredPreparedStatement newBrokeredStatement(BrokeredStatementControl statementControl,
String sql, Object generatedKeys) throws SQLException {
-		return new BrokeredPreparedStatement(statementControl, getJDBCLevel(), sql);
+		//DERBY-3513 - Possible IBM 1.5 JIT bug workaround.
+		// create local variable for jdbcLevel
+		int jdbcLevel = getJDBCLevel();
+		return new BrokeredPreparedStatement(statementControl, jdbcLevel, sql);
 	}
 	public BrokeredCallableStatement newBrokeredStatement(BrokeredStatementControl statementControl,
String sql) throws SQLException {
-		return new BrokeredCallableStatement(statementControl, getJDBCLevel(), sql);
+		// DERBY-3513 - Possible IBM 1.5 JIT bug workaround.
+		// create local variable for jdbcLevel
+		int jdbcLevel = getJDBCLevel();
+		return new BrokeredCallableStatement(statementControl, jdbcLevel, sql);
 	}
 
 	/**



Mime
View raw message