Merged V3.1 to HEAD

13037: PostgreSQL upgrade scripts from 2.1.6, 2.2.0, and 2.2.1
   12995: Fix build: account for change of path to log4j jar in 3rd party project
   12981: Added support for monitoring of installed modules via JMX
   12971: Correction to 12970 - better handle case when log4j not available.
   12970: Work around log4j bug to allow editing of the "threshold" property of HierarchyDynamicBean through JMX
   12926: Merged V3.0 to V3.1
      Merged V2.2 to V3.0
         12861: ETHREEOH-19, ETHREEOH-24, ETHREEOH-113, ETHREEOH-115, ETHREEOH-449, ETHREEOH-537, ETHREEOH-561, ETHREEOH-566, ETHREEOH-572, ETHREEOH-1072: Retry failed transactions from MS SQL Server in snapshot mode 
   12924: Avoid direct log4j dependencies
   12918: Avoided Log4J imports by using introspection


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13516 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2009-03-10 13:17:24 +00:00
parent 352e065b07
commit b60eb95e1b
4 changed files with 34 additions and 28 deletions

View File

@@ -48,6 +48,7 @@ import org.hibernate.StaleStateException;
import org.hibernate.cache.CacheException;
import org.hibernate.exception.ConstraintViolationException;
import org.hibernate.exception.LockAcquisitionException;
import org.hibernate.exception.SQLGrammarException;
import org.springframework.aop.MethodBeforeAdvice;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.dao.ConcurrencyFailureException;
@@ -101,7 +102,8 @@ public class RetryingTransactionHelper
StaleStateException.class,
ObjectNotFoundException.class,
CacheException.class, // Usually a cache replication issue
RemoteCacheException.class // A cache replication issue
RemoteCacheException.class, // A cache replication issue
SQLGrammarException.class // Actually specific to MS SQL Server 2005 - we check for this
};
}
@@ -456,15 +458,13 @@ public class RetryingTransactionHelper
public static Throwable extractRetryCause(Throwable cause)
{
Throwable retryCause = ExceptionStackUtil.getCause(cause, RETRY_EXCEPTIONS);
if (retryCause == null)
if (retryCause == null || retryCause instanceof SQLGrammarException
&& ((SQLGrammarException) retryCause).getErrorCode() != 3960)
{
return null;
}
else
{
// A simple match
return retryCause;
}
// A simple match
return retryCause;
}
/**