Examples of CountedSessionHome


Examples of org.jboss.test.session.interfaces.CountedSessionHome

    * @throws Exception
    */
   public void testEjbRemoveCalledForEveryCall() throws Exception
   {
      CounterSessionHome counterHome = (CounterSessionHome)getInitialContext().lookup("CounterSession");
      CountedSessionHome countedHome = (CountedSessionHome)getInitialContext().lookup("CountedSession");
     
      CounterSession counter = counterHome.create();
      counter.clearCounters();
     
      CountedSession counted = countedHome.create();
      assertEquals("createCounter", 1, counter.getCreateCounter());
      assertEquals("removeCounter", 1, counter.getRemoveCounter());
     
      counted.doSomething(0);
      assertEquals("createCounter", 2, counter.getCreateCounter());
View Full Code Here

Examples of org.jboss.test.session.interfaces.CountedSessionHome

    * @throws Exception
    */
   public void testEjbRemoveNotCalledForEveryCall() throws Exception
   {
      CounterSessionHome counterHome = (CounterSessionHome)getInitialContext().lookup("CounterSession");
      CountedSessionHome countedHome = (CountedSessionHome)getInitialContext().lookup("CountedSession2");
     
      CounterSession counter = counterHome.create();
      counter.clearCounters();
     
      CountedSession counted = countedHome.create();
      assertEquals("createCounter", 1, counter.getCreateCounter());
      assertEquals("removeCounter", 0, counter.getRemoveCounter());
     
      counted.doSomething(0);
      assertEquals("createCounter", 1, counter.getCreateCounter());
View Full Code Here

Examples of org.jboss.test.session.interfaces.CountedSessionHome

   }

   public void testEjbRemoveMultiThread() throws Exception
   {
      CounterSessionHome counterHome = (CounterSessionHome)getInitialContext().lookup("CounterSession");
      CountedSessionHome countedHome = (CountedSessionHome)getInitialContext().lookup("CountedSession2");
     
      CounterSession counter = counterHome.create();
      counter.clearCounters();
     
      final CountedSession counted = countedHome.create();
     
      Runnable runnable = new Runnable() {
         public void run()
         {
            try
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.