Examples of MarshalledObjectForLocalCalls


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

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

    {
        StringUtilBuffer buffer = new StringUtilBuffer(10*1024,10*1024);

        for (int exec=0;exec<MAX_LOOP;exec++)
        {
          MarshalledObjectForLocalCalls obj = new MarshalledObjectForLocalCalls(myTest);
            Object value = obj.get();

            if (!(myTest instanceof String))
            {
              assertNotSame(myTest,value);
            }
View Full Code Here

Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

    {
        StringUtilBuffer buffer = new StringUtilBuffer(10*1024,10*1024);

        for (int exec=0;exec<MAX_LOOP;exec++)
        {
          MarshalledObjectForLocalCalls marshall = new MarshalledObjectForLocalCalls(myTest);
           
          byteOut.reset();
            ObjectOutputStream regularOutput = new ObjectOutputStream(byteOut);
            regularOutput.writeObject(marshall);
            regularOutput.flush();
           
            ObjectInputStream regularInput = new ObjectInputStream(new ByteArrayInputStream(byteOut.toByteArray()));
            marshall  = (MarshalledObjectForLocalCalls)regularInput.readObject();

            Object value = marshall.get();
            assertNotSame(myTest,value);
            assertSame(myTest.getClass(),value.getClass());
            if (!(myTest instanceof String[]))assertEquals(myTest,value);
        }

View Full Code Here

Examples of org.jboss.serial.io.MarshalledObjectForLocalCalls

/* 314 */     if (invocation.getMetaData("IS_LOCAL", "IS_LOCAL") == null) throw exception;
/*     */
/* 316 */     InvocationResponse response = new InvocationResponse();
/* 317 */     response.setContextInfo(responseContext);
/*     */
/* 319 */     response.addAttachment("IS_LOCAL_EXCEPTION", new MarshalledObjectForLocalCalls(exception));
/*     */
/* 321 */     return response;
/*     */   }
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.