public Object invoke(InvocationRequest invocation) throws Throwable { // Create a security context for the invocation establishSecurityContext(invocation); InvocationResponse value = (InvocationResponse) super.invoke(invocation); if (value.getResponse() instanceof ManagementView) { // Replace the ManagementView with its proxy value.setResponse(mgtViewProxy); } if (value.getResponse() instanceof DeploymentManager) { // Replace the DeploymentManager with its proxy value.setResponse(deployMgrProxy); } return value; }