try
{
if (springBean instanceof AsyncAction)
{
AsyncAction action = (AsyncAction) springBean;
AsyncActionContext actionContext = new AsyncActionContext(inUserActionRequest.getParams());
actionContext.setActionId(actionKey);
actionController.execute(actionContext, action);
}
else if (springBean instanceof TaskHandlerAsyncAction)
{
TaskHandlerAsyncAction action = (TaskHandlerAsyncAction) springBean;
AsyncActionContext actionContext = new AsyncActionContext(inUserActionRequest.getParams());
actionContext.setActionId(actionKey);
actionController.execute(actionContext, action);
}
else
{
throw new IllegalArgumentException("Supplied bean is not an executable async action.");