Examples of doSomething()


Examples of org.jboss.serial.data.proxy.InterfaceForProxy.doSomething()

    public void testJBossSerialization() throws Exception
    {
        InterfaceForProxy proxy = createProxy();

        assertEquals(6,proxy.doSomething());


        ByteArrayOutputStream byteout = new ByteArrayOutputStream();
        JBossObjectOutputStream out = new JBossObjectOutputStream (byteout);
        out.writeObject(proxy);
View Full Code Here

Examples of org.jboss.serial.data.proxy.InterfaceForProxy.doSomething()

        JBossObjectOutputStream out = new JBossObjectOutputStream (byteout);
        out.writeObject(proxy);
        out.flush();
        JBossObjectInputStream inp = new JBossObjectInputStream (new ByteArrayInputStream(byteout.toByteArray()));
        InterfaceForProxy proxy2 = (InterfaceForProxy)inp.readObject();
        assertEquals(6,proxy2.doSomething());
    }

    private InterfaceForProxy createProxy() {
        ProxiedClass proxyClass = new ProxiedClass(2);
        assertEquals(2,proxyClass.doSomething());
View Full Code Here

Examples of org.jboss.serial.data.proxy.ProxiedClass.doSomething()

        assertEquals(6,proxy2.doSomething());
    }

    private InterfaceForProxy createProxy() {
        ProxiedClass proxyClass = new ProxiedClass(2);
        assertEquals(2,proxyClass.doSomething());

        Class proxyClazz = Proxy.getProxyClass(Thread.currentThread().getContextClassLoader(),new Class[]{InterfaceForProxy.class});
        System.out.println(proxyClazz);

        InterfaceForProxy proxy = (InterfaceForProxy) Proxy.newProxyInstance(Thread.currentThread().getContextClassLoader(),new Class[]{InterfaceForProxy.class},new TestHandler(3,proxyClass));
View Full Code Here

Examples of org.jboss.test.aop.integration.complex.support.TestIntercepted.doSomething()

   public A()
   {
      TestIntercepted test = new TestIntercepted();
      if (TestInterceptor.intercepted)
         throw new RuntimeException("Should not be intercepted yet!");
      test.doSomething();
      if (TestInterceptor.intercepted == false)
         throw new RuntimeException("Not intercepted!");
   }
}
View Full Code Here

Examples of org.jboss.test.aop.integration.complex.support.b.TestIntercepted.doSomething()

      }
     
      TestIntercepted test = new TestIntercepted();
      if (test.isIntercepted())
         throw new RuntimeException("Should not be intercepted yet!");
      test.doSomething();
      if (test.isIntercepted() == false)
         throw new RuntimeException("Not intercepted!");
   }
}
View Full Code Here

Examples of org.jboss.test.aop.integration.junit.support.TestIntercepted.doSomething()

   public void testIntercepted() throws Exception
   {
      TestIntercepted intercepted = new TestIntercepted();
      assertFalse(TestInterceptor.intercepted);
      intercepted.doSomething();
      assertTrue(TestInterceptor.intercepted);
   }
}
View Full Code Here

Examples of org.jboss.test.aop.integration.simple.support.TestIntercepted.doSomething()

   public A()
   {
      TestIntercepted test = new TestIntercepted();
      if (TestInterceptor.intercepted)
         throw new RuntimeException("Should not be intercepted yet!");
      test.doSomething();
      if (TestInterceptor.intercepted == false)
         throw new RuntimeException("Not intercepted!");
   }
}
View Full Code Here

Examples of org.jboss.test.deployers.scope.support.TestComponent1.doSomething()

         assertEquals(1, components.size());
         DeploymentUnit component = components.get(0);
         TestComponent1 proxy = component.getAttachment("proxy", TestComponent1.class);
        
         TestClassAspect.classAnnotation = null;
         proxy.doSomething();
        
         TestClassAnnotation annotation = TestClassAspect.classAnnotation;
         assertNotNull(annotation);
         assertEquals("Class", annotation.where());
      }
View Full Code Here

Examples of org.jboss.test.deployers.scope.support.TestComponent2.doSomething()

         assertEquals(1, components.size());
         DeploymentUnit component = components.get(0);
         TestComponent2 proxy = component.getAttachment("proxy", TestComponent2.class);
        
         TestClassAspect.classAnnotation = null;
         proxy.doSomething();
        
         TestClassAnnotation annotation = TestClassAspect.classAnnotation;
         assertNotNull(annotation);
         assertEquals("Instance", annotation.where());
      }
View Full Code Here

Examples of org.jboss.test.invokers.interfaces.BusinessObject.doSomething()

      int last = interceptors.size() - 1;
      interceptors.set(last, new InvokerInterceptor());
      container.setInterceptors(interceptors);

      // Invoke over the rpc transport
      bean.doSomething();
      // Invoker over the jms transport
      String reply = bean.doSomethingSlowly("arg1", "arg2");
      assertTrue("Reply is decorated with viaJMSGatewayMDB",
         reply.indexOf("viaJMSGatewayMDB") > 0 );
      // Remove the bean to close the jms resources
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.