Examples of MarshalledObjectForLocalCalls


Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

      return invocation.invokeNext();
   }
  
   protected Object invokeLocal(Invocation invocation, Container container) throws Throwable
   {
      Invocation copy = (Invocation) new MarshalledObjectForLocalCalls(invocation).get();
      copy.getMetaData().addMetaData(IS_LOCAL, IS_LOCAL, Boolean.TRUE, PayloadKey.AS_IS);
      org.jboss.aop.joinpoint.InvocationResponse response = null;

      /*
       * EJBTHREE-1385
       *
       * Integration of EJB3 Proxy changed the invocation model,
       * so SessionSpecContainers now are supported via
       * dynamicInvoke(Invocation), where all other
       * SessionContainers use the @deprecated
       * dynamicInvoke(Object,Invocation)
       */
      if (container instanceof SessionSpecContainer)
      {
         SessionSpecContainer ssc = (SessionSpecContainer) container;
         response = ssc.dynamicInvoke(copy);
      }
      else
      {
         response = ((SessionContainer) container).dynamicInvoke(null, copy);
      }
     
     
      Map contextInfo = response.getContextInfo();
      if (contextInfo != null)
      {
         MarshalledObjectForLocalCalls wrappedException = (MarshalledObjectForLocalCalls) response.getContextInfo().get(IS_LOCAL_EXCEPTION);
         if (wrappedException != null)
         {
            throw (Throwable) wrappedException.get();
         }
      }
      invocation.setResponseContextInfo(response.getContextInfo());
      MarshalledObjectForLocalCalls wrapped = (MarshalledObjectForLocalCalls) response.getResponse();
      Object rtn = null;
      if (wrapped != null)
      {
         rtn = wrapped.get();
      }
      return rtn;
   }
View Full Code Here

Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

      if (invocation.getMetaData(IsLocalInterceptor.IS_LOCAL,IsLocalInterceptor.IS_LOCAL) == null) throw exception;

      InvocationResponse response = new InvocationResponse();
      response.setContextInfo(responseContext);

      response.addAttachment(IsLocalInterceptor.IS_LOCAL_EXCEPTION, new MarshalledObjectForLocalCalls(exception));

      return response;
   }
View Full Code Here

Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

   {
      InvocationResponse response;
      // marshall return value
      if (rtn != null && invocation.getMetaData(IsLocalInterceptor.IS_LOCAL, IsLocalInterceptor.IS_LOCAL) != null)
      {
         response = new InvocationResponse(new MarshalledObjectForLocalCalls(rtn));
      }
      else
      {
         response = new InvocationResponse(rtn);
      }
View Full Code Here

Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

      if (invocation.getMetaData(IsLocalInterceptor.IS_LOCAL,IsLocalInterceptor.IS_LOCAL) == null) throw exception;

      InvocationResponse response = new InvocationResponse();
      response.setContextInfo(responseContext);

      response.addAttachment(IsLocalInterceptor.IS_LOCAL_EXCEPTION, new MarshalledObjectForLocalCalls(exception));

      return response;
   }
View Full Code Here

Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

   {
      InvocationResponse response;
      // marshall return value
      if (rtn != null && invocation.getMetaData(IsLocalInterceptor.IS_LOCAL, IsLocalInterceptor.IS_LOCAL) != null)
      {
         response = new InvocationResponse(new MarshalledObjectForLocalCalls(rtn));
      }
      else
      {
         response = new InvocationResponse(rtn);
      }
View Full Code Here

Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

      if (invocation.getMetaData(IsLocalInterceptor.IS_LOCAL,IsLocalInterceptor.IS_LOCAL) == null) throw exception;

      InvocationResponse response = new InvocationResponse();
      response.setContextInfo(responseContext);

      response.addAttachment(IsLocalInterceptor.IS_LOCAL_EXCEPTION, new MarshalledObjectForLocalCalls(exception));

      return response;
   }
View Full Code Here

Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

   {
      InvocationResponse response;
      // marshall return value
      if (rtn != null && invocation.getMetaData(IsLocalInterceptor.IS_LOCAL, IsLocalInterceptor.IS_LOCAL) != null)
      {
         response = new InvocationResponse(new MarshalledObjectForLocalCalls(rtn));
      }
      else
      {
         response = new InvocationResponse(rtn);
      }
View Full Code Here

Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

      if (invocation.getMetaData(IsLocalInterceptor.IS_LOCAL,IsLocalInterceptor.IS_LOCAL) == null) throw exception;

      InvocationResponse response = new InvocationResponse();
      response.setContextInfo(responseContext);

      response.addAttachment(IsLocalInterceptor.IS_LOCAL_EXCEPTION, new MarshalledObjectForLocalCalls(exception));

      return response;
   }
View Full Code Here

Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

   {
      InvocationResponse response;
      // marshall return value
      if (rtn != null && invocation.getMetaData(IsLocalInterceptor.IS_LOCAL, IsLocalInterceptor.IS_LOCAL) != null)
      {
         response = new InvocationResponse(new MarshalledObjectForLocalCalls(rtn));
      }
      else
      {
         response = new InvocationResponse(rtn);
      }
View Full Code Here

Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

   private static <T> T marshallOrPass(T obj, Class<T> type) throws IOException, ClassNotFoundException
   {
      if(passByRef)
         return obj;
      else
         return type.cast(new MarshalledObjectForLocalCalls(obj).get());
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.