1 24 25 package org.objectweb.cjdbc.scenario.raidb1.loadbalancer; 26 27 import java.sql.Connection ; 28 import java.sql.ResultSet ; 29 import java.sql.Statement ; 30 31 import org.objectweb.cjdbc.scenario.templates.SimpleRaidb1Template; 32 33 39 public class Raidb1RoundRobinScenario extends SimpleRaidb1Template 40 { 41 46 public void testRoundRobin() throws Exception 47 { 48 cm.loadVirtualDatabases(controller, "myDB", 50 "hsqldb-raidb1-round-robin.xml"); 51 mainVdb = controller.getVirtualDatabase("myDB"); 52 mainVdb.enableAllBackends(); 53 54 Connection con = getCJDBCConnection(); 56 assertNotNull("Connection is null", con); 57 Statement statement = con.createStatement(); 58 ResultSet rs1 = statement.executeQuery("Select * from document"); 59 assertNotNull("ResultSet is null", rs1); 60 } 61 62 } 63 | Popular Tags |