1 24 25 package org.objectweb.cjdbc.scenario.templates; 26 27 import org.objectweb.cjdbc.controller.core.Controller; 28 import org.objectweb.cjdbc.scenario.tools.components.ComponentInterface; 29 30 31 39 public abstract class MultipleBackendsRaidb1Template extends SimpleRaidb1Template 40 { 41 protected ComponentInterface hm3 = null; 42 protected ComponentInterface hm4 = null; 43 protected ComponentInterface hm5 = null; 44 protected ComponentInterface hm6 = null; 45 protected ComponentInterface hm7 = null; 46 protected ComponentInterface hm8 = null; 47 protected ComponentInterface hm9 = null; 48 protected ComponentInterface hm10 = null; 49 50 53 protected void setUp() 54 { 55 try 56 { 57 hm.start("9000"); 59 hm.loaddatabase("9000"); 60 hm1 = hm.start("9001"); 61 hm.loaddatabase("9001"); 62 hm2 = hm.start("9002"); 63 hm.loaddatabase("9002"); 64 hm3 = hm.start("9003"); 65 hm.loaddatabase("9003"); 66 hm4 = hm.start("9004"); 67 hm.loaddatabase("9004"); 68 hm5 = hm.start("9005"); 69 hm.loaddatabase("9005"); 70 hm6 = hm.start("9006"); 71 hm.loaddatabase("9006"); 72 hm7 = hm.start("9007"); 73 hm.loaddatabase("9007"); 74 hm8 = hm.start("9008"); 75 hm.loaddatabase("9008"); 76 hm9 = hm.start("9009"); 77 hm.loaddatabase("9009"); 78 81 controller = (Controller) cm.start("25322").getProcess(); 82 83 cm.loaddatabase("25322","hsqldb-raidb1-multiple-backends.xml"); 84 mainVdb = controller.getVirtualDatabase("myDB"); 85 mainVdb.enableAllBackends(); 86 } 87 catch (Exception e) 88 { 89 e.printStackTrace(); 90 fail("Could not start controller"); 91 tearDown(); 92 } 93 } 94 95 96 99 protected void tearDown() 100 { 101 super.tearDown(); 102 } 103 } 104 | Popular Tags |