rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlu...@apache.org
Subject svn commit: r1296475 - in /incubator/rave/trunk/rave-components/rave-commons/src: main/java/org/apache/rave/jdbc/util/DataSourcePopulator.java test/java/org/apache/rave/jdbc/util/DataSourcePopulatorTest.java
Date Fri, 02 Mar 2012 21:14:14 GMT
Author: carlucci
Date: Fri Mar  2 21:14:13 2012
New Revision: 1296475

URL: http://svn.apache.org/viewvc?rev=1296475&view=rev
Log:
RAVE-502: Unable to load an initial_data.sql file in Oracle

Modified:
    incubator/rave/trunk/rave-components/rave-commons/src/main/java/org/apache/rave/jdbc/util/DataSourcePopulator.java
    incubator/rave/trunk/rave-components/rave-commons/src/test/java/org/apache/rave/jdbc/util/DataSourcePopulatorTest.java

Modified: incubator/rave/trunk/rave-components/rave-commons/src/main/java/org/apache/rave/jdbc/util/DataSourcePopulator.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-commons/src/main/java/org/apache/rave/jdbc/util/DataSourcePopulator.java?rev=1296475&r1=1296474&r2=1296475&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-commons/src/main/java/org/apache/rave/jdbc/util/DataSourcePopulator.java
(original)
+++ incubator/rave/trunk/rave-components/rave-commons/src/main/java/org/apache/rave/jdbc/util/DataSourcePopulator.java
Fri Mar  2 21:14:13 2012
@@ -180,7 +180,7 @@ public class DataSourcePopulator impleme
     }
 
     protected static ResultSet executeQuery(Connection conn, String executeScriptQuery) throws
SQLException {
-        Statement statement = conn.createStatement();
+        Statement statement = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
         return statement.executeQuery(executeScriptQuery);
     }
 

Modified: incubator/rave/trunk/rave-components/rave-commons/src/test/java/org/apache/rave/jdbc/util/DataSourcePopulatorTest.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-commons/src/test/java/org/apache/rave/jdbc/util/DataSourcePopulatorTest.java?rev=1296475&r1=1296474&r2=1296475&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-commons/src/test/java/org/apache/rave/jdbc/util/DataSourcePopulatorTest.java
(original)
+++ incubator/rave/trunk/rave-components/rave-commons/src/test/java/org/apache/rave/jdbc/util/DataSourcePopulatorTest.java
Fri Mar  2 21:14:13 2012
@@ -91,7 +91,7 @@ public class DataSourcePopulatorTest {
         expect(populate.execute(INSERT)).andReturn(true).once();
         replay(populate);
 
-        expect(connection.createStatement()).andReturn(check).once();
+        expect(connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY)).andReturn(check).once();
         expect(connection.createStatement()).andReturn(populate).once();
         connection.close();
         expectLastCall();
@@ -116,7 +116,7 @@ public class DataSourcePopulatorTest {
         expect(populate.execute(INSERT)).andReturn(true).once();
         replay(populate);
 
-        expect(connection.createStatement()).andReturn(check).once();
+        expect(connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY)).andReturn(check).once();
         expect(connection.createStatement()).andReturn(populate).once();
         connection.close();
         expectLastCall();
@@ -137,7 +137,7 @@ public class DataSourcePopulatorTest {
         expect(populate.execute(INSERT)).andThrow(new SQLException());
         replay(populate);
 
-        expect(connection.createStatement()).andReturn(check).once();
+        expect(connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY)).andReturn(check).once();
         expect(connection.createStatement()).andReturn(populate).once();
         connection.close();
         expectLastCall();
@@ -161,7 +161,7 @@ public class DataSourcePopulatorTest {
         expect(check.executeQuery(CHECK_QUERY)).andReturn(rs);
         replay(check);
 
-        expect(connection.createStatement()).andReturn(check).once();
+        expect(connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY)).andReturn(check).once();
         connection.close();
         expectLastCall().andThrow(new SQLException());
         replay(connection);



Mime
View raw message