mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
76994: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 70127: MNT-9882 - refactoring of caches git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@77833 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -43,6 +43,8 @@ import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.PropertyCheck;
|
||||
import org.alfresco.util.transaction.TransactionListener;
|
||||
import org.alfresco.util.transaction.TransactionSupportUtil;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -86,7 +88,8 @@ public class IntegrityChecker
|
||||
NodeServicePolicies.OnCreateChildAssociationPolicy,
|
||||
NodeServicePolicies.OnDeleteChildAssociationPolicy,
|
||||
NodeServicePolicies.OnCreateAssociationPolicy,
|
||||
NodeServicePolicies.OnDeleteAssociationPolicy
|
||||
NodeServicePolicies.OnDeleteAssociationPolicy,
|
||||
TransactionListener
|
||||
{
|
||||
private static Log logger = LogFactory.getLog(IntegrityChecker.class);
|
||||
|
||||
@@ -113,7 +116,7 @@ public class IntegrityChecker
|
||||
*/
|
||||
public static void setWarnInTransaction()
|
||||
{
|
||||
AlfrescoTransactionSupport.bindResource(KEY_WARN_IN_TRANSACTION, Boolean.TRUE);
|
||||
TransactionSupportUtil.bindResource(KEY_WARN_IN_TRANSACTION, Boolean.TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -124,7 +127,7 @@ public class IntegrityChecker
|
||||
*/
|
||||
public static boolean isWarnInTransaction()
|
||||
{
|
||||
Boolean warnInTransaction = (Boolean) AlfrescoTransactionSupport.getResource(KEY_WARN_IN_TRANSACTION);
|
||||
Boolean warnInTransaction = (Boolean) TransactionSupportUtil.getResource(KEY_WARN_IN_TRANSACTION);
|
||||
if (warnInTransaction == null || warnInTransaction == Boolean.FALSE)
|
||||
{
|
||||
return false;
|
||||
@@ -756,4 +759,28 @@ public class IntegrityChecker
|
||||
// done
|
||||
return allIntegrityResults;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeCommit(boolean readOnly)
|
||||
{
|
||||
checkIntegrity();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeCompletion()
|
||||
{
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterCommit()
|
||||
{
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterRollback()
|
||||
{
|
||||
// NO-OP
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user