Package org.jboss.jms.client

Examples of org.jboss.jms.client.FailoverValve.enter()


      }

      try
      {
         FailoverValve valve = new FailoverValve ();
         valve.enter();
         valve.leave();
         valve.leave(); // extra leave call, should throw an exception
         fail("Valve.close didn't generate an exception, Valve is not safe!");
      }
      catch (Throwable e)
View Full Code Here


      final FailoverValve valve = new FailoverValve(2000);
      final Slot slot = new Slot();

      // prevent the valve from being possible to close

      valve.enter();

      new Thread(new Runnable()
      {
         public void run()
         {
View Full Code Here

      final FailoverValve valve = new FailoverValve(2000);
      final Slot slot = new Slot();

      // flip-flop the valve

      valve.enter();
      valve.leave();

      new Thread(new Runnable()
      {
         public void run()
View Full Code Here

      // prevent the valve from being possible to close

      log.info("entering the valve");

      valve.enter();

      // attempt to close the valve from 10 concurrent threads
      for(int i = 0; i < THREAD_COUNT; i++)
      {
         slot[i] = new Slot();
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.