public static InvocationResponse marshallResponse(Invocation invocation, Object rtn, Map responseContext) throws java.io.IOException { InvocationResponse response = new InvocationResponse(rtn); response.setContextInfo(responseContext); return response; }
public Object invoke(InvocationRequest invocation) throws Throwable { // Create a security context for the invocation establishSecurityContext(invocation); org.jboss.aop.joinpoint.Invocation inv =(org.jboss.aop.joinpoint.Invocation)invocation.getParameter(); SecurityContainer.setInvocation(inv); 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; }
response.addAttachment(StatefulConstants.NEW_ID, sessionId); return response; remove(argument); InvocationResponse response = new InvocationResponse(null); response.setContextInfo(statefulInvocation.getResponseContextInfo()); return response;
/** * Handle a DeploymentManager distribute invocation for copyContent == true * * @see DeploymentManager#distribute(String, java.net.URL, boolean) * @param request - the remoting invocation */ public InvocationResponse handleStream(InputStream contentIS, InvocationRequest request) throws Throwable { // Get the deployment repository for this deploymentID SerializableDeploymentID deploymentTarget = (SerializableDeploymentID) request.getParameter(); String[] names = delegate.distribute(deploymentTarget, contentIS); deploymentTarget.setRepositoryNames(names); return new InvocationResponse(names[0]); }
public Object invoke(Invocation invocation) throws Throwable { if (isLocal()) { Object oid = invocation.getMetaData(Dispatcher.DISPATCHER, Dispatcher.OID); if (Dispatcher.singleton.isRegistered(oid)) { InvocationResponse response = Dispatcher.singleton.invoke(invocation); invocation.setResponseContextInfo(response.getContextInfo()); return response.getResponse(); } } return invocation.invokeNext(); }
return (String) response.getResponse();
if (sessionId != null) response.addAttachment(StatefulConstants.NEW_ID, sessionId);
public org.jboss.aop.joinpoint.InvocationResponse _dynamicInvoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable { ((org.jboss.aop.joinpoint.InvocationBase) invocation).setInstanceResolver(instanceAdvisor.getMetaData()); org.jboss.aop.advice.Interceptor[] aspects = instanceAdvisor.getInterceptors(); return new org.jboss.aop.joinpoint.InvocationResponse(invocation.invokeNext(aspects)); }
protected Object invokeLocal(Invocation invocation, Container container) throws Throwable { Invocation copy = marshallOrPass(invocation, Invocation.class); copy.getMetaData().addMetaData(IS_LOCAL, IS_LOCAL, Boolean.TRUE, PayloadKey.AS_IS); try { // Invoke upon the container SessionContainer sc = (SessionContainer) container; InvocationResponse response = sc.dynamicInvoke(copy); // it could really have been a copy invocation.setResponseContextInfo(response.getContextInfo()); return marshallOrPass(response.getResponse(), Object.class); } // TODO: Either Throwable (as it used to be) or Exception (which is better) catch(Throwable t) { throw marshallOrPass(t, Throwable.class); } finally { copy.getMetaData().removeMetaData(IS_LOCAL, IS_LOCAL); } }
public InvocationResponse dynamicInvoke(Invocation invocation) throws Throwable { ClassLoader oldLoader = Thread.currentThread().getContextClassLoader(); EJBContainerInvocation newSi = null; pushEnc(); try { Thread.currentThread().setContextClassLoader(classloader); MethodInvocation si = (MethodInvocation) invocation; MethodInfo info = getAdvisor().getMethodInfo(si.getMethodHash()); if (info == null) { throw new RuntimeException("Could not resolve beanClass method from proxy call"); } newSi = new MessageContainerInvocation(info); newSi.setArguments(si.getArguments()); newSi.setMetaData(si.getMetaData()); newSi.setAdvisor(getAdvisor()); InvocationResponse response = new InvocationResponse(newSi.invokeNext()); response.setContextInfo(newSi.getResponseContextInfo()); return response; } finally { Thread.currentThread().setContextClassLoader(oldLoader); popEnc(); } }
public org.jboss.aop.joinpoint.InvocationResponse _dynamicInvoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable { ((org.jboss.aop.joinpoint.InvocationBase) invocation).setInstanceResolver(instanceAdvisor.getMetaData()); org.jboss.aop.advice.Interceptor[] aspects = instanceAdvisor.getInterceptors(); return new org.jboss.aop.joinpoint.InvocationResponse(invocation.invokeNext(aspects)); }
nextInvocation.setArguments(methodInvocation.getArguments()); nextInvocation.setAdvisor(this); InvocationResponse response = new InvocationResponse(nextInvocation.invokeNext()); response.setContextInfo(nextInvocation.getResponseContextInfo()); return response;
try return new InvocationResponse(method.invoke(target, args));
InvocationResponse response = new InvocationResponse(null); return response;