Package org.jboss.test.cluster.hasingleton

Examples of org.jboss.test.cluster.hasingleton.HASingletonPojoExample


  
   private void shouldHaveHaSingletonDeployed(String namingUrl, int exampleNumber) throws Exception
   {
      env.setProperty(Context.PROVIDER_URL, namingUrl);
      Context ctx = new InitialContext(env);
      HASingletonPojoExample pojo = (HASingletonPojoExample)ctx.lookup("test/cluster/hasingleton/simplepojo/" + exampleNumber);     
      assertTrue("Pojo in " + namingUrl + " should be deployed as HA singleton", pojo.isMasterNode());     
   }
View Full Code Here


   {
      env.setProperty(Context.PROVIDER_URL, namingUrl);
      Context ctx = new InitialContext(env);
      try
      {
         HASingletonPojoExample pojo = (HASingletonPojoExample)ctx.lookup("test/cluster/hasingleton/simplepojo/" + exampleNumber);
         fail("Should have thrown a NamingException indicating 'test not bound'");
      }
      catch(NamingException ne)
      {
      }     
View Full Code Here

      String[] namingUrls = getNamingURLs();
     
      String namingUrl = namingUrls[masterIndex];
      env.setProperty(Context.PROVIDER_URL, namingUrl);
      Context ctx = new InitialContext(env);
      HASingletonPojoExample pojo = (HASingletonPojoExample)ctx.lookup("test/cluster/hasingleton/simplepojo");
     
      assertTrue("Pojo in " + namingUrl + " should be deployed as HA singleton", pojo.isMasterNode());
     
      namingUrl = namingUrls[nonMasterIndex];
      env.setProperty(Context.PROVIDER_URL, namingUrl);
      ctx = new InitialContext(env);
      try
View Full Code Here

TOP

Related Classes of org.jboss.test.cluster.hasingleton.HASingletonPojoExample

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.