mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.1 to HEAD
6327: Drops alfresco-deployment.zip in build/dist instead of build. 6328:Set AVM file name requirements as lenient as possible. 6329: Fixed DNS name restriction to allow 1-char host labels. 6330: Setting read-only flag for start up components (AR-1621 and AR-193) 6331: Minor formatting 6332: Implementation of a read-only, HTTP-based ContentStore. 6333: AR-1619: A debug message needed changing as the FileFolderService now supports adding children onto system nodes. 6334: Build fix 6335: Fix for AWC-1447 (Office Add-In - Create Collaboration Space) 6337: Fixed AR-1622: WebService requests must be wrapped in retries git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6721 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -38,6 +38,7 @@ import javax.servlet.http.HttpSession;
|
||||
import javax.transaction.UserTransaction;
|
||||
import javax.xml.rpc.server.ServletEndpointContext;
|
||||
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
import org.alfresco.repo.webservice.axis.QueryConfigHandler;
|
||||
import org.alfresco.repo.webservice.types.AssociationDefinition;
|
||||
import org.alfresco.repo.webservice.types.Cardinality;
|
||||
@@ -511,8 +512,7 @@ public class Utils
|
||||
* SOAP message context
|
||||
* @return The Spring WebApplicationContext
|
||||
*/
|
||||
public static WebApplicationContext getSpringContext(
|
||||
MessageContext msgContext)
|
||||
public static WebApplicationContext getSpringContext(MessageContext msgContext)
|
||||
{
|
||||
// get hold of the web application context via the message context
|
||||
HttpServletRequest req = (HttpServletRequest) msgContext
|
||||
@@ -528,6 +528,8 @@ public class Utils
|
||||
* @param msgContext
|
||||
* SOAP message context
|
||||
* @return a UserTransaction
|
||||
*
|
||||
* @deprecated Use {@link #getRetryingTransactionHelper(MessageContext)}
|
||||
*/
|
||||
public static UserTransaction getUserTransaction(MessageContext msgContext)
|
||||
{
|
||||
@@ -539,6 +541,24 @@ public class Utils
|
||||
return transactionService.getUserTransaction();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the executer to wrap transactional callbacks in for better transaction behaviour.
|
||||
*
|
||||
* @param msgContext
|
||||
* SOAP message context
|
||||
* @return
|
||||
* a transactional, retrying, callback executer
|
||||
*/
|
||||
public static RetryingTransactionHelper getRetryingTransactionHelper(MessageContext msgContext)
|
||||
{
|
||||
// get the service regsistry
|
||||
ServiceRegistry svcReg = (ServiceRegistry) getSpringContext(msgContext)
|
||||
.getBean(ServiceRegistry.SERVICE_REGISTRY);
|
||||
|
||||
TransactionService transactionService = svcReg.getTransactionService();
|
||||
return transactionService.getRetryingTransactionHelper();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current http session id
|
||||
*
|
||||
|
Reference in New Issue
Block a user