1 24 25 package org.objectweb.cjdbc.scenario.horizontal; 26 27 import java.sql.Connection ; 28 import java.sql.ResultSet ; 29 import java.sql.Statement ; 30 31 import org.objectweb.cjdbc.scenario.templates.HorizontalWithCacheTemplate; 32 import org.objectweb.cjdbc.scenario.tools.ScenarioUtility; 33 34 39 public class DistributedWithCacheScenario extends HorizontalWithCacheTemplate 40 { 41 46 public void testSetup() throws Exception 47 { 48 Connection con = getCJDBCConnection("25322"); 49 Statement statement = con.createStatement(); 50 ResultSet rs = statement.executeQuery("Select * from document"); 51 System.out.println(ScenarioUtility.convertResultSet(rs)); 52 assertNotNull("ResultSet before failure is null", rs); 53 54 statement.executeUpdate("update product set name='horizontalTest'"); 55 56 rs = statement.executeQuery("Select * from document"); 57 System.out.println(ScenarioUtility.convertResultSet(rs)); 58 assertNotNull("ResultSet before failure is null", rs); 59 } 60 } | Popular Tags |