Minor fixes:

- ContentStore directory creation does a few retries if it fails
 - A little less Session clearing during content store cleaning


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5941 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-06-13 19:33:30 +00:00
parent 2794a59085
commit 7735ae0acd
2 changed files with 50 additions and 4 deletions

View File

@@ -1166,6 +1166,7 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
// Loop through, extracting content URLs
List<Serializable> convertedValues = new ArrayList<Serializable>(1000);
TypeConverter converter = DefaultTypeConverter.INSTANCE;
int unflushedCount = 0;
while(results.next())
{
Node node = (Node) results.get()[0];
@@ -1200,8 +1201,13 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
}
}
}
// evict all data from the session
getSession().clear();
unflushedCount++;
if (unflushedCount >= 1000)
{
// evict all data from the session
getSession().clear();
unflushedCount = 0;
}
}
return convertedValues;
}