mahout-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject svn commit: r775288 - /lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
Date Fri, 15 May 2009 18:55:34 GMT
Author: srowen
Date: Fri May 15 18:55:34 2009
New Revision: 775288

URL: http://svn.apache.org/viewvc?rev=775288&view=rev
Log:
Adjust JDBC settings to avoid error on Oracle driver

Modified:
    lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java

Modified: lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
URL: http://svn.apache.org/viewvc/lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java?rev=775288&r1=775287&r2=775288&view=diff
==============================================================================
--- lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
(original)
+++ lucene/mahout/trunk/core/src/main/java/org/apache/mahout/cf/taste/impl/model/jdbc/AbstractJDBCDataModel.java
Fri May 15 18:55:34 2009
@@ -557,7 +557,10 @@
     private ResultSetUserIterator(DataSource dataSource, String getUsersSQL) throws TasteException
{
       try {
         connection = dataSource.getConnection();
-        statement = connection.prepareStatement(getUsersSQL);
+        // These settings should enable the ResultSet to be iterated in both directions
+        statement = connection.prepareStatement(getUsersSQL,
+                                                ResultSet.TYPE_SCROLL_INSENSITIVE,
+                                                ResultSet.CONCUR_READ_ONLY);
         statement.setFetchDirection(ResultSet.FETCH_UNKNOWN);
         log.debug("Executing SQL query: {}", getUsersSQL);
         resultSet = statement.executeQuery();



Mime
View raw message