Merged V2.1 to HEAD

6975: Fix for WCM-883 - ZIP files with non-ascii characters, now gives the user an option for the encoding of the ZIP filenames
   6978: Fixed test for 2.1 bean names.
   6981: Fixes test failure.
   6982: Integrity exception message carries full failure details.
   6983: Added upgrade script for SQL Server.
   6988: Replaced UserTransaction with RetryingTransactionHelper.
   6989: Added org.hibernate.ObjectNotFoundException RetryingTransactionHelper.
   6996: Added updated support for datetime tokens in the lucene index
   7001: FIx for AR-1806
   7015: Added missing post-create index script for QName columns on alf_child_assoc.
   7022: Merged V2.0 to V2.1:
      7013: Fixed primary child node status query


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7371 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-11-13 01:15:58 +00:00
parent 0ddb624acf
commit 59458fb578
36 changed files with 1661 additions and 108 deletions

View File

@@ -38,6 +38,7 @@ import org.alfresco.repo.security.permissions.AccessDeniedException;
import org.alfresco.service.transaction.TransactionService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.ObjectNotFoundException;
import org.hibernate.StaleObjectStateException;
import org.hibernate.StaleStateException;
import org.hibernate.exception.ConstraintViolationException;
@@ -73,7 +74,8 @@ public class RetryingTransactionHelper
BatchUpdateException.class,
ConstraintViolationException.class,
DataIntegrityViolationException.class,
StaleStateException.class
StaleStateException.class,
ObjectNotFoundException.class
};
}
@@ -398,6 +400,15 @@ public class RetryingTransactionHelper
return null;
}
}
else if (retryCause instanceof ObjectNotFoundException)
{
// This is (I'm almost certain) an optimistic locking failure in disguise.
if (retryCause.getMessage().contains("No row"))
{
return retryCause;
}
return null;
}
else
{
return retryCause;