From 4fe9a4f3456f0a9245f7ec452f779b19ac5a7485 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Thu, 18 Dec 2008 17:23:44 +0000 Subject: [PATCH] Merged V3.0 to HEAD 12123: Merged V2.2 to V3.0 11466: Fixed sql-query DELETE syntax 11614: Flush after putChild, fix for ETWOTWO-777 11641: Merged V2.1 to V2.2 11632: Improvements for AVM index FULL and AUTO rebuild. 11646: Upgrade scripts tweaks: 11650: Added unit test to confirm fix of ETWOTWO-740 11674: Added missing EHCache definitions for QName, Namespace and Locale caches 11825: Fixed Eclipse classpath addition of path for Oracle JDBC driver 12125: ETHREEOH-899: Image transformations do not follow Options 12127: Merged V2.2 to V3.0 11675: Node DAO optimizations 11680: Full Fix for ETWOTWO-777 + more protection for nested write transactions beneath read transactions. 11729: AVM creates and deletes no longer update the directory mod time - ETWOTWO-801 11738: Fix for ETWOTWO - fixed check for TX propagation mode 11748: Fixed ETWOTWO-578: RepositoryWebService fetchMore() does not fetch last node 11749: Incorporate feedback from ACT-5440: MySQL-specific tweaks to the upgrade scripts 11750: Moved t_qnames_dyn section to after t_qnames 11752: Fixed ETWOTWO-734: ImporterComponent uses Lucene queries 11785: Build Fix:Remove auto created person TX commit fro DB 11853: Fix for ETWOTWO-687 - missed a case when generating lists of actions for modified files list 11940: Stress test main method for ETWOTWO-744 11950: Fixed ETWOTWO-909 and ETWOTWO-911 11987: Dirty checking for attribute related DAOs 12008: Fixed test for transaction-requiring AttributeService 12128: Merged V2.2 to V3.0 11530: Merged V2.1 to V2.2 11499: Defensive clear of the security context to avoid any ticket sharing for a given user - ETWOTWO-326 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12501 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../auth/HTTPRequestAuthenticationFilter.java | 1 + .../repo/webservice/AbstractQuerySession.java | 69 +------------------ 2 files changed, 3 insertions(+), 67 deletions(-) diff --git a/source/java/org/alfresco/repo/webdav/auth/HTTPRequestAuthenticationFilter.java b/source/java/org/alfresco/repo/webdav/auth/HTTPRequestAuthenticationFilter.java index bf74785c86..70aebbd6a7 100644 --- a/source/java/org/alfresco/repo/webdav/auth/HTTPRequestAuthenticationFilter.java +++ b/source/java/org/alfresco/repo/webdav/auth/HTTPRequestAuthenticationFilter.java @@ -237,6 +237,7 @@ public class HTTPRequestAuthenticationFilter implements Filter tx.begin(); // Authenticate the user + m_authComponent.clearCurrentSecurityContext(); m_authComponent.setCurrentUser(userName); // Get the user node and home folder diff --git a/source/java/org/alfresco/repo/webservice/AbstractQuerySession.java b/source/java/org/alfresco/repo/webservice/AbstractQuerySession.java index 8972f7576c..4fe28eaff2 100644 --- a/source/java/org/alfresco/repo/webservice/AbstractQuerySession.java +++ b/source/java/org/alfresco/repo/webservice/AbstractQuerySession.java @@ -89,7 +89,7 @@ public abstract class AbstractQuerySession implements Q /** * {@inheritDoc} */ - public ServerQuery getQuery() + public ServerQuery getQuery() { return query; } @@ -156,7 +156,7 @@ public abstract class AbstractQuerySession implements Q { // There isn't an excess of rows remaining, so copy to the last one long lastResultIndex = allResultsSize - 1L; - long rowCopyCount = lastResultIndex - position; + long rowCopyCount = lastResultIndex - position + 1L; batchedResults = makeArray((int)rowCopyCount); System.arraycopy(allResults, (int)position, batchedResults, 0, (int)rowCopyCount); // Position is after last @@ -185,70 +185,5 @@ public abstract class AbstractQuerySession implements Q " New Position: " + position); } return batchedResults; -// long allResultsSize = allResults.getTotalRowCount(); -// -// ResultSet batchedResults = null; -// if (position >= allResultsSize) -// { -// // We are already past the last result -// batchedResults = new ResultSet(); -// batchedResults.setRows(new ResultSetRow[] {}); -// batchedResults.setTotalRowCount(0); -// batchedResults.setMetaData(allResults.getMetaData()); -// // Position is after last -// position = allResultsSize; -// } -// else if (position == 0 && batchSize >= allResultsSize) -// { -// // We can give back the original results -// batchedResults = allResults; -// // Position is after last -// position = allResultsSize; -// } -// else if ((position + batchSize) >= allResultsSize) -// { -// // There isn't an excess of rows remaining, so copy to the last one -// long lastResultIndex = allResultsSize - 1L; -// long rowCopyCount = lastResultIndex - position; -// ResultSetRow[] batchedRows = new ResultSetRow[(int)rowCopyCount]; -// ResultSetRow[] allRows = allResults.getRows(); -// System.arraycopy(allRows, (int)position, batchedRows, 0, (int)rowCopyCount); -// // Build the results -// batchedResults = new ResultSet(); -// batchedResults.setRows(batchedRows); -// batchedResults.setTotalRowCount(rowCopyCount); -// batchedResults.setMetaData(allResults.getMetaData()); -// // Position is after last -// position = allResultsSize; -// } -// else -// { -// // There are an excess of rows remaining -// ResultSetRow[] batchedRows = new ResultSetRow[(int)batchSize]; -// ResultSetRow[] allRows = allResults.getRows(); -// System.arraycopy(allRows, (int)position, batchedRows, 0, (int)batchSize); -// // Build the results -// batchedResults = new ResultSet(); -// batchedResults.setRows(batchedRows); -// batchedResults.setTotalRowCount(batchSize); -// batchedResults.setMetaData(allResults.getMetaData()); -// // Position increases by the batch size -// position += batchSize; -// } -// // Keep track of whether we expect more results -// if (position >= allResultsSize) -// { -// expectMoreResults = false; -// } -// // Done -// if (logger.isDebugEnabled()) -// { -// logger.debug("\n" + -// "Fetched net set of results: \n" + -// " Total results count: " + allResultsSize + "\n" + -// " Batch size: " + batchedResults.getTotalRowCount() + "\n" + -// " New Position: " + position); -// } -// return batchedResults; } }