mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged BRANCHES\DEV\MODEL_SPLIT to HEAD
Split the data dictionary out from the repository. There is a new DataModel project to add into eclipse Still to move a few context dependent tests git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20877 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -61,9 +61,6 @@ public abstract class AbstractContentAccessor implements ContentAccessor
|
||||
|
||||
private StackTraceElement[] traceLoggerChannelAssignTrace;
|
||||
|
||||
/** when set, ensures that listeners are executed within a transaction */
|
||||
private RetryingTransactionHelper transactionHelper;
|
||||
|
||||
private String contentUrl;
|
||||
private String mimetype;
|
||||
private String encoding;
|
||||
@@ -126,11 +123,6 @@ public abstract class AbstractContentAccessor implements ContentAccessor
|
||||
return property;
|
||||
}
|
||||
|
||||
public void setRetryingTransactionHelper(RetryingTransactionHelper helper)
|
||||
{
|
||||
this.transactionHelper = helper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Derived classes can call this method to ensure that necessary trace logging is performed
|
||||
* when the IO Channel is opened.
|
||||
@@ -263,33 +255,12 @@ public abstract class AbstractContentAccessor implements ContentAccessor
|
||||
// nothing to do
|
||||
return;
|
||||
}
|
||||
RetryingTransactionCallback<Object> cb = new RetryingTransactionCallback<Object>()
|
||||
|
||||
for (ContentStreamListener listener : listeners)
|
||||
{
|
||||
public Object execute()
|
||||
{
|
||||
for (ContentStreamListener listener : listeners)
|
||||
{
|
||||
listener.contentStreamClosed();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
if (transactionHelper != null)
|
||||
{
|
||||
// Execute in transaction.
|
||||
transactionHelper.doInTransaction(cb, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
cb.execute();
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
throw new ContentIOException("Failed to executed channel close callbacks", e);
|
||||
}
|
||||
listener.contentStreamClosed();
|
||||
}
|
||||
|
||||
// done
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
@@ -356,37 +327,12 @@ public abstract class AbstractContentAccessor implements ContentAccessor
|
||||
// nothing to do
|
||||
return;
|
||||
}
|
||||
// We're now doing this in a retrying transaction, which means
|
||||
// that the body of execute() must be idempotent.
|
||||
RetryingTransactionCallback<Object> cb = new RetryingTransactionCallback<Object>()
|
||||
|
||||
for (ContentStreamListener listener : listeners)
|
||||
{
|
||||
public Object execute()
|
||||
{
|
||||
for (ContentStreamListener listener : listeners)
|
||||
{
|
||||
listener.contentStreamClosed();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
// We're now doing this inside a Retrying transaction.
|
||||
// NB
|
||||
if (transactionHelper != null)
|
||||
{
|
||||
// just create a transaction
|
||||
transactionHelper.doInTransaction(cb, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
cb.execute();
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
throw new ContentIOException("Failed to executed channel close callbacks", e);
|
||||
}
|
||||
listener.contentStreamClosed();
|
||||
}
|
||||
|
||||
// done
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
|
Reference in New Issue
Block a user