Package org.jboss.test.cluster.ejb3.stateful.nested.base.std

Examples of org.jboss.test.cluster.ejb3.stateful.nested.base.std.ParentStatefulRemote.increment()


      // Confirm parent is dead
      Assert.assertEquals("Remote counter (via dead parent): ", -1, monitor.incrementParent());
      Assert.assertFalse("parent.remove() fails", monitor.removeParent());
     
      // Confirm nested beans still work following parent remove
      Assert.assertEquals("Remote counter (direct):", 2 ,nested.increment());     
      Assert.assertEquals("Local counter (monitor):", 1 , monitor.incrementLocalNested());
      Assert.assertEquals("Deep nested id", deepId, monitor.getDeepNestedId());
      Assert.assertEquals("Local deep nested id", localDeepId, monitor.getLocalDeepNestedId());
     
      // Remove the bottom tier
View Full Code Here


      // Confirm it is dead
      Assert.assertEquals("Local deep nested removed", "ERROR", monitor.getLocalDeepNestedId());
      Assert.assertFalse("localDeepNested.remove() fails", monitor.removeLocalDeepNested());
     
      // Confirm other beans still work following parent remove
      Assert.assertEquals("Remote counter (direct):", 3 ,nested.increment());     
      Assert.assertEquals("Local counter (monitor):", 2 , monitor.incrementLocalNested());
      Assert.assertEquals("Deep nested id", deepId, monitor.getDeepNestedId());
     
      // Remove the nested bean
      removeBean(nested);
View Full Code Here

      ParentStatefulRemote stateful = beanSet.parent;
      VMID node1 = stateful.getVMID();
      assertNotNull("State node: ", node1);
      getLog ().debug ("Node 1 ID: " +node1);

      assertEquals("Counter: ", 1, stateful.increment());
      assertEquals("Counter: ", 2, stateful.increment());
      sleep(300);

      // Now we switch to the other node, simulating a failure on node 1
      stateful.setUpFailover("once");
View Full Code Here

      VMID node1 = stateful.getVMID();
      assertNotNull("State node: ", node1);
      getLog ().debug ("Node 1 ID: " +node1);

      assertEquals("Counter: ", 1, stateful.increment());
      assertEquals("Counter: ", 2, stateful.increment());
      sleep(300);

      // Now we switch to the other node, simulating a failure on node 1
      stateful.setUpFailover("once");
      VMID node2 = stateful.getVMID();
View Full Code Here

      assertNotNull("State node: ", node2);
      getLog ().debug ("Node 2 ID : " +node2);

      assertFalse("Failover has occured", node1.equals(node2));

      assertEquals("Counter: ", 3, stateful.increment());
      assertEquals("Counter: ", 4, stateful.increment());

      runner.removeBean(stateful);
      getLog().debug("ok");
   }
View Full Code Here

      getLog ().debug ("Node 2 ID : " +node2);

      assertFalse("Failover has occured", node1.equals(node2));

      assertEquals("Counter: ", 3, stateful.increment());
      assertEquals("Counter: ", 4, stateful.increment());

      runner.removeBean(stateful);
      getLog().debug("ok");
   }
View Full Code Here

         }
         beanSet = runner.getNestedBeanSet();
      }

      // Exercise the beans, trigger replication
      assertEquals("Remote counter: ", 1, parent.increment());
      parentInv++;
      nestedInv++;
      assertEquals("Remote counter: ", 2, parent.increment());
      parentInv++;
      nestedInv++;
View Full Code Here

      // Exercise the beans, trigger replication
      assertEquals("Remote counter: ", 1, parent.increment());
      parentInv++;
      nestedInv++;
      assertEquals("Remote counter: ", 2, parent.increment());
      parentInv++;
      nestedInv++;
      assertEquals("Local counter: ", 1, parent.incrementLocal());
      parentInv++;
      assertEquals("Local counter: ", 2, parent.incrementLocal());
View Full Code Here

      getLog().debug("==================================");
     
      NestedBeanSet beanSet = getNestedBeanSet();
      ParentStatefulRemote stateful = beanSet.parent;
     
      Assert.assertEquals("Remote counter: ", 1, stateful.increment());
      Assert.assertEquals("Remote counter: ", 2, stateful.increment());
      Assert.assertEquals("Local counter: ", 1, stateful.incrementLocal());
      Assert.assertEquals("Local counter: ", 2, stateful.incrementLocal());
     
      removeBean(stateful);
View Full Code Here

     
      NestedBeanSet beanSet = getNestedBeanSet();
      ParentStatefulRemote stateful = beanSet.parent;
     
      Assert.assertEquals("Remote counter: ", 1, stateful.increment());
      Assert.assertEquals("Remote counter: ", 2, stateful.increment());
      Assert.assertEquals("Local counter: ", 1, stateful.incrementLocal());
      Assert.assertEquals("Local counter: ", 2, stateful.incrementLocal());
     
      removeBean(stateful);
     
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.