1 24 25 package org.objectweb.cjdbc.scenario.raidb1.driver; 26 27 import java.sql.Connection ; 28 29 import org.objectweb.cjdbc.scenario.templates.Raidb1Template; 30 import org.objectweb.cjdbc.scenario.tools.testlet.AbstractTestLet; 31 import org.objectweb.cjdbc.scenario.tools.testlet.BlobTestLet; 32 import org.objectweb.cjdbc.scenario.tools.testlet.ClobTestLet; 33 import org.objectweb.cjdbc.scenario.tools.testlet.CopyTestLet; 34 35 41 public class Raidb1BlobScenario extends Raidb1Template 42 { 43 48 public void testClob() throws Exception 49 { 50 Connection con = getCJDBCConnection(); 51 ClobTestLet let = new ClobTestLet(con); 52 let.execute(); 53 } 54 55 56 63 64 public void testBlobs() throws Exception 65 { 66 String [] testFiles = new String []{"/image/logo-noel.jpg","/image/photo.jpg","/image/cbsetup.exe"}; 68 69 CopyTestLet let = new CopyTestLet(); 70 let.executeBatch(AbstractTestLet.FILE_NAME,testFiles); 71 72 Connection con = getCJDBCConnection(); 73 BlobTestLet bloblet = new BlobTestLet(con); 74 bloblet.set(AbstractTestLet.USE_CJDBC_CLASS,"true"); 75 bloblet.executeBatch(AbstractTestLet.FILE_NAME,testFiles); 76 77 bloblet.set(AbstractTestLet.USE_CJDBC_CLASS,"true"); 78 bloblet.executeBatch(AbstractTestLet.FILE_NAME,testFiles); 79 } 80 81 } | Popular Tags |