mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user