Examples of StatefulInterceptorInterface


Examples of org.jboss.ejb3.test.interceptors.instances.StatefulInterceptorInterface

     
      ProxyContainer<SimpleBean> container = new ProxyContainer<SimpleBean>("InterceptorInstancesTestCase", "InterceptorContainer", SimpleBean.class);
     
      assertEquals(0, StatefulInterceptor.postConstructs);
     
      StatefulInterceptorInterface bean1 = container.constructProxy(new Class[] { StatefulInterceptorInterface.class });
      StatefulInterceptorInterface bean2 = container.constructProxy(new Class[] { StatefulInterceptorInterface.class });
     
      bean1.setState(1);
      bean2.setState(2);
     
      assertEquals(1, bean1.getState());
      assertEquals(2, bean2.getState());
     
      assertEquals(2, StatefulInterceptor.postConstructs);

      log.info("======= Done");
   }
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.