1 21 22 package org.apache.derbyTesting.functionTests.tests.store; 23 24 import java.sql.Connection ; 25 import java.sql.DriverManager ; 26 import java.sql.ResultSetMetaData ; 27 import java.sql.ResultSet ; 28 import java.sql.Statement ; 29 import java.sql.SQLException ; 30 import java.sql.Types ; 31 import java.util.Properties ; 32 33 import org.apache.derby.tools.ij; 34 import org.apache.derby.tools.JDBCDisplayUtil; 35 import org.apache.derbyTesting.functionTests.util.TestUtil; 36 37 42 43 public class bootLock1 { 44 public static void main(String [] args) { 45 Connection con; 46 Statement stmt; 47 48 try 49 { 50 51 ij.getPropertyArg(args); 54 Properties prop = new Properties (); 55 prop.setProperty("databaseName", "wombat"); 56 con = TestUtil.getDataSourceConnection(prop); 57 58 stmt = con.createStatement(); 59 stmt.execute("drop table t1"); 61 for(;;) 63 { 64 Thread.sleep(30000); 65 } 66 } 67 catch (SQLException e) { 68 } 72 catch (Throwable e) { 73 } 76 77 } 78 79 static private void dumpSQLExceptions (SQLException se) { 80 while (se != null) { 81 System.out.println("SQLSTATE("+se.getSQLState()+"): "); 82 se = se.getNextException(); 83 } 84 } 85 } 86 87 88 89 90 | Popular Tags |