1 24 25 package org.objectweb.cjdbc.scenario.horizontal; 26 27 import java.sql.Connection ; 28 29 import org.objectweb.cjdbc.driver.ControllerInfo; 30 import org.objectweb.cjdbc.scenario.templates.HorizontalTemplate; 31 import org.objectweb.cjdbc.scenario.tools.testlet.AbstractTestLet; 32 import org.objectweb.cjdbc.scenario.tools.testlet.BlobTestLet; 33 import org.objectweb.cjdbc.scenario.tools.testlet.ClobTestLet; 34 import org.objectweb.cjdbc.scenario.tools.testlet.CopyTestLet; 35 36 41 public class BlobRevisitedScenario extends HorizontalTemplate 42 { 43 ControllerInfo[] controllers = new ControllerInfo[]{ 44 new ControllerInfo("localhost", 25322), 45 new ControllerInfo("localhost", 25323)}; 46 47 52 public void testClob() throws Exception 53 { 54 Connection con = getCJDBCConnection(controllers); 55 ClobTestLet let = new ClobTestLet(con); 56 let.execute(); 57 } 58 59 66 67 public void testBlobs() throws Exception 68 { 69 String [] testFiles = new String []{"/image/logo-noel.jpg"}; 72 73 CopyTestLet let = new CopyTestLet(); 74 let.executeBatch(AbstractTestLet.FILE_NAME, testFiles); 75 76 Connection con = getCJDBCConnection(controllers); 77 BlobTestLet bloblet = new BlobTestLet(con); 78 bloblet.set(AbstractTestLet.USE_CJDBC_CLASS, "true"); 79 bloblet.executeBatch(AbstractTestLet.FILE_NAME, testFiles); 80 81 bloblet.set(AbstractTestLet.USE_CJDBC_CLASS, "true"); 82 bloblet.executeBatch(AbstractTestLet.FILE_NAME, testFiles); 83 } 84 } | Popular Tags |