Package org.jboss.test.ejb.passivationcl.stateful

Examples of org.jboss.test.ejb.passivationcl.stateful.StatefulSession


   public void testMain() throws Exception
   {
      Object ref = getInitialContext().lookup("StatefulSession");
      StatefulSessionHome home = (StatefulSessionHome) PortableRemoteObject.narrow(ref, StatefulSessionHome.class);
      StatefulSession stateful = home.create();
      stateful.test();

      int i = 5;
      while(!stateful.isPassivated())
      {
         if(i == 0)
            fail("Gave up waiting for passivation.");
         try
         {
            Thread.sleep(1500);
         }
         catch(InterruptedException e)
         {
            //
         }
         --i;
      }

      stateful.remove();
   }
View Full Code Here

TOP

Related Classes of org.jboss.test.ejb.passivationcl.stateful.StatefulSession

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.