mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added 'version' column to ADM entities
- A patch will assign initial version values to the entities - Deprecated TransactionUtil in favour of the RetryingTransactionHelper - Renamed RetryingTransactionHelper.Callback to RetryingTransactionHelper.RetryingTransactionCallback The name Callback clashes with many other classes in the classpath - Moved loads of components to be included in the retry behaviour Duplicate name checks - This is done using a query, but the entity update is not written to the database early - Concurrent adds of the same-named child node will only fail at the end of the transaction - TODO: Detect the duplicate violation during transaction retrying Workaround for ADMLuceneTest - Disable session size resource management during tests git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5823 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -38,6 +38,7 @@ import java.util.Locale;
|
||||
import org.alfresco.error.StackTraceUtil;
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.service.cmr.repository.ContentAccessor;
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.repository.ContentIOException;
|
||||
@@ -251,8 +252,7 @@ public abstract class AbstractContentAccessor implements ContentAccessor
|
||||
// nothing to do
|
||||
return;
|
||||
}
|
||||
RetryingTransactionHelper.Callback cb =
|
||||
new RetryingTransactionHelper.Callback()
|
||||
RetryingTransactionCallback<Object> cb = new RetryingTransactionCallback<Object>()
|
||||
{
|
||||
public Object execute()
|
||||
{
|
||||
@@ -274,7 +274,7 @@ public abstract class AbstractContentAccessor implements ContentAccessor
|
||||
{
|
||||
cb.execute();
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Throwable e)
|
||||
{
|
||||
throw new ContentIOException("Failed to executed channel close callbacks", e);
|
||||
}
|
||||
@@ -347,8 +347,7 @@ public abstract class AbstractContentAccessor implements ContentAccessor
|
||||
}
|
||||
// We're now doing this in a retrying transaction, which means
|
||||
// that the body of execute() must be idempotent.
|
||||
RetryingTransactionHelper.Callback cb =
|
||||
new RetryingTransactionHelper.Callback()
|
||||
RetryingTransactionCallback<Object> cb = new RetryingTransactionCallback<Object>()
|
||||
{
|
||||
public Object execute()
|
||||
{
|
||||
@@ -372,7 +371,7 @@ public abstract class AbstractContentAccessor implements ContentAccessor
|
||||
{
|
||||
cb.execute();
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Throwable e)
|
||||
{
|
||||
throw new ContentIOException("Failed to executed channel close callbacks", e);
|
||||
}
|
||||
|
Reference in New Issue
Block a user