1 24 25 package org.objectweb.cjdbc.scenario.templates; 26 27 import org.objectweb.cjdbc.controller.core.Controller; 28 import org.objectweb.cjdbc.controller.virtualdatabase.VirtualDatabase; 29 import org.objectweb.cjdbc.scenario.tools.components.backend.DatabaseManager; 30 import org.objectweb.cjdbc.scenario.tools.components.controller.ControllerManager; 31 32 38 public abstract class Raidb2Template extends SimpleRaidb2Template 39 { 40 protected ControllerManager cm = new ControllerManager(); 41 protected DatabaseManager hm = new DatabaseManager(); 42 protected Process hm1 = null,hm2 = null; 43 protected Controller controller = null; 44 protected VirtualDatabase mainVdb; 45 46 49 protected void setUp() 50 { 51 try 52 { 53 cm.loaddatabase(""+controller.getPortNumber(),"hsqldb-raidb2.xml"); 54 mainVdb = controller.getVirtualDatabase("myDB"); 55 mainVdb.enableAllBackends(); 56 } 57 catch(Exception e) 58 { 59 e.printStackTrace(); 60 fail("Could not start controller"); 61 tearDown(); 62 } 63 } 64 } 65 | Popular Tags |