1 24 25 package org.objectweb.cjdbc.scenario.raidb1; 26 27 import java.sql.Connection ; 28 import java.sql.SQLException ; 29 30 import org.objectweb.cjdbc.scenario.templates.SimpleRaidb1Template; 31 32 38 public class BlockingPessimisticSchedulerScenario extends SimpleRaidb1Template 39 { 40 45 public void testFakeDrop() throws Exception 46 { 47 cm 49 .loadVirtualDatabases(controller, "myDB", 50 "hsqldb-pessimistic-raidb1.xml"); 51 mainVdb = controller.getVirtualDatabase("myDB"); 52 mainVdb.enableAllBackends(); 53 54 Connection con = getCJDBCConnection(); 55 String query = "insert into table quizz values(0,0)"; 56 try 58 { 59 con.createStatement().executeUpdate(query); 60 } 61 catch (SQLException e) 62 { 63 e.printStackTrace(); 64 } 65 try 66 { 67 con.createStatement().executeUpdate(query); 68 } 69 catch (SQLException e1) 70 { 71 e1.printStackTrace(); 72 } 73 } 74 } | Popular Tags |