The ActionServiceImpl was attempting to call a service method after an exception.

- This didn't fail before because the actions didn't use the authenticated services but does now.
 - When an action fails, the service attempts to make it asynchronous, but requires some info in order to proceed.  That info is now fetched upfront.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2385 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-02-15 14:03:39 +00:00
parent 976fa1a09c
commit d29cf7e074

View File

@@ -365,6 +365,9 @@ public class ActionServiceImpl implements ActionService, RuntimeActionService, A
logger.debug("Current action = " + action.getId());
}
// get the current user early in case the process fails and we are unable to do it later
String currentUserName = this.authenticationComponent.getCurrentUserName();
if (actionChain == null || actionChain.contains(action.getId()) == false)
{
if (logger.isDebugEnabled() == true)
@@ -432,7 +435,7 @@ public class ActionServiceImpl implements ActionService, RuntimeActionService, A
if (compensatingAction != null)
{
// Set the current user
((ActionImpl)compensatingAction).setRunAsUser(this.authenticationComponent.getCurrentUserName());
((ActionImpl)compensatingAction).setRunAsUser(currentUserName);
// Queue the compensating action ready for execution
this.asynchronousActionExecutionQueue.executeAction(this, compensatingAction, actionedUponNodeRef, false, null);