Some transaction retrying for Web Client

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5911 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-06-11 14:09:18 +00:00
parent d871aebc12
commit adb817b386
8 changed files with 547 additions and 526 deletions

View File

@@ -39,6 +39,7 @@ import org.alfresco.repo.configuration.ConfigurableService;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.content.metadata.MetadataExtracter;
import org.alfresco.repo.content.metadata.MetadataExtracterRegistry;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.lock.LockService;
import org.alfresco.service.cmr.lock.LockStatus;
@@ -376,6 +377,9 @@ public final class Repository
* @param context FacesContext
*
* @return UserTransaction
*
* @deprecated
* @see #getRetryingTransactionHelper(FacesContext)
*/
public static UserTransaction getUserTransaction(FacesContext context)
{
@@ -383,6 +387,18 @@ public final class Repository
return transactionService.getUserTransaction();
}
/**
* Returns the transaction helper that executes a unit of work.
*
* @param context FacesContext
* @return Returns the transaction helper
*/
public static RetryingTransactionHelper getRetryingTransactionHelper(FacesContext context)
{
TransactionService transactionService = getServiceRegistry(context).getTransactionService();
return transactionService.getRetryingTransactionHelper();
}
/**
* Return a UserTransaction instance
*