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.ComponentInterface; 30 import org.objectweb.cjdbc.scenario.tools.components.backend.DatabaseManager; 31 import org.objectweb.cjdbc.scenario.tools.components.controller.ControllerManager; 32 33 39 public abstract class SimpleRaidb0WithLargeDatabaseTemplate extends Template 40 { 41 protected ControllerManager cm = new ControllerManager(); 42 protected DatabaseManager hm = new DatabaseManager(); 43 protected ComponentInterface hm1 = null, hm2 = null; 44 protected Controller controller = null; 45 protected VirtualDatabase mainVdb; 46 47 50 protected void setUp() 51 { 52 try 53 { 54 hm1 = hm.start("9001"); 55 hm1.loadDatabase("database-generated.template"); 56 hm2 = hm.start("9002"); 57 hm2.loadDatabase("database-generated-2.template"); 58 controller = (Controller)cm.start("25322").getProcess(); 59 } 60 catch (Exception e) 61 { 62 e.printStackTrace(); 63 fail("Could not start controller"); 64 tearDown(); 65 } 66 } 67 68 71 protected void tearDown() 72 { 73 hm.stopAll(); 74 cm.stopAll(); 75 } 76 } | Popular Tags |