Merged V2.2 to HEAD

8121: Merged V2.1 to V2.2
      8088: Turned off debug logging.
      8090: Tweaked session cache limiting for AVM.
      8095: Fix for issue raised in ACT 402
      8108: Fix for AWC-1816
      8115: Build fix 
      8117: Fix AR-1217: OpenOffice connection is actively maintained

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8480 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2008-03-10 15:22:43 +00:00
parent 316924e8de
commit 1f8c86d46d
13 changed files with 230 additions and 44 deletions

View File

@@ -245,10 +245,16 @@ class AVMNodeDAOHibernate extends HibernateDaoSupport implements
*/
public void clear()
{
fgLogger.error(getSession().getStatistics());
if (fgLogger.isDebugEnabled())
{
fgLogger.debug(getSession().getStatistics());
}
getSession().flush();
getSession().clear();
fgLogger.error(getSession().getStatistics());
if (fgLogger.isDebugEnabled())
{
fgLogger.debug(getSession().getStatistics());
}
}
/* (non-Javadoc)

View File

@@ -67,6 +67,23 @@ public class MetadataExtracterRegistry
extracterCacheReadLock = extractionCacheLock.readLock();
extracterCacheWriteLock = extractionCacheLock.writeLock();
}
/**
* Force the registry to drop its cache of extractors. This is useful for the case where an extractor
* becomes available only after the registry has initialized the cache.
*/
public void resetCache()
{
extracterCacheWriteLock.lock();
try
{
extracterCache.clear();
}
finally
{
extracterCacheWriteLock.unlock();
}
}
/**
* Register an instance of an extracter for use

View File

@@ -99,7 +99,10 @@ public class MissingContentReindexComponent extends AbstractReindexComponent
// search for it in the index, sorting with youngest first
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
sp.setQuery("TEXT:" + AbstractLuceneIndexerImpl.NOT_INDEXED_CONTENT_MISSING);
sp.setQuery(
"TEXT:" + AbstractLuceneIndexerImpl.NOT_INDEXED_CONTENT_MISSING +
" TEXT: " + AbstractLuceneIndexerImpl.NOT_INDEXED_TRANSFORMATION_FAILED +
" TEXT: " + AbstractLuceneIndexerImpl.NOT_INDEXED_NO_TRANSFORMATION);
sp.addSort(SearchParameters.SORT_IN_DOCUMENT_ORDER_DESCENDING);
ResultSet results = null;
try
@@ -121,6 +124,7 @@ public class MissingContentReindexComponent extends AbstractReindexComponent
}
};
transactionService.getRetryingTransactionHelper().doInTransaction(reindexWork);
count++;
// check if we have to break out
if (isShuttingDown())
{

View File

@@ -96,7 +96,7 @@ public abstract class AbstractAuthenticationComponent implements AuthenticationC
{
this.transactionService = transactionService;
}
public TransactionService getTransactionService()
{
return transactionService;
@@ -141,13 +141,20 @@ public abstract class AbstractAuthenticationComponent implements AuthenticationC
public Authentication execute() throws Throwable
{
NodeRef userNode = personService.getPerson(userName);
if (userNode != null)
if (personService.personExists(userName))
{
// Get the person name and use that as the current user to line up with permission checks
String personName = (String) nodeService.getProperty(userNode, ContentModel.PROP_USERNAME);
return setCurrentUserImpl(personName);
NodeRef userNode = personService.getPerson(userName);
if (userNode != null)
{
// Get the person name and use that as the current user to line up with permission checks
String personName = (String) nodeService.getProperty(userNode, ContentModel.PROP_USERNAME);
return setCurrentUserImpl(personName);
}
else
{
// Set using the user name
return setCurrentUserImpl(userName);
}
}
else
{