Object returnValue = super.invoke(pInvocation);
if (returnValue != null && returnValue instanceof CompressedResultWrapper) {
returnValue = ((CompressedResultWrapper)returnValue).getResult();
}
if (returnValue instanceof AppContextAwareResultWrapper) {
AppContextAwareResultWrapper resultWrapper = (AppContextAwareResultWrapper) returnValue;
Map<String, Object> attributes = resultWrapper.getAppContext();
if (attributes != null && attributes.size() > 0) {
logger.debug("Populated app context from remote invocation ["
+ attributes.size() + "]");
FrameworkUtils.setAppContextValues(new Hashtable<String, Object>(attributes));
}