Package org.jboss.test.session.interfaces

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


    * ather than putting it back to the pool.
    * @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());
View Full Code Here


    * from the pool, and only removed when the app gets undeployed
    * @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());
View Full Code Here

      assertEquals("removeCounter", 0, counter.getRemoveCounter());
   }

   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() {
View Full Code Here

TOP

Related Classes of org.jboss.test.session.interfaces.CounterSessionHome

Copyright © 2018 www.massapicom. 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.