Examples of DisableClusteredAnnotationRemote


Examples of org.jboss.test.cluster.ejb3.clusteredsession.ejbthree1346.DisableClusteredAnnotationRemote

   public void testStatefulBean() throws Exception
   {
      // Connect to the server0 JNDI
      InitialContext ctx = getInitialContext(0);

      DisableClusteredAnnotationRemote stateful = null;     
      try
      {
         stateful = (DisableClusteredAnnotationRemote) ctx.lookup("DisableClusteredAnnotationStateful/remote");
      }
      catch (NameNotFoundException nnfe)
      {
         fail(nnfe.getMessage());
      }

      NodeAnswer node1 = stateful.getNodeState ();
      getLog ().debug ("Node 1 ID: " +node1);

      // Now we switch to the other node, simulating a failure on node 1
      //
      stateful.setUpFailover("once");
      try
      {
         stateful.getNodeState ();
         fail("GenericClusteringException did not propagate");
      }
      catch (Exception good) {}
   }
View Full Code Here

Examples of org.jboss.test.cluster.ejb3.clusteredsession.ejbthree1346.DisableClusteredAnnotationRemote

   /** Test stateless bean by demonstrating no load balancing */
   public void testStatelessBean() throws Exception
   {
      InitialContext ctx = getInitialContext(0);

      DisableClusteredAnnotationRemote stateless = null;
     
      try
      {
         stateless = (DisableClusteredAnnotationRemote) ctx.lookup("DisableClusteredAnnotationStateless/remote");
      }
      catch (NameNotFoundException nnfe)
      {
         fail(nnfe.getMessage());
      }
     
      NodeAnswer node1 = stateless.getNodeState();
      assertNotNull(node1);
      getLog ().debug ("Node 1 ID: " +node1);
     
      for (int i = 0; i < 20; i++)
      {
         assertEquals(node1, stateless.getNodeState());
      }
   }
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.