KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mmbase > tests > ShutdownHsql


1 /*
2
3 This software is OSI Certified Open Source Software.
4 OSI Certified is a certification mark of the Open Source Initiative.
5
6 The license (Mozilla version 1.0) can be read at the MMBase site.
7 See http://www.MMBase.org/license
8
9 */

10 package org.mmbase.tests;
11 import java.sql.*;
12
13 /**
14  * This class contains static methods for MMBase tests.
15  *
16  * @author Michiel Meeuwissen
17  */

18 public class ShutdownHsql {
19     public static void main(String JavaDoc[] argv) {
20         try {
21             Class.forName("org.hsqldb.jdbcDriver" );
22         } catch (Exception JavaDoc e) {
23             System.err.println("ERROR: failed to load HSQLDB JDBC driver." + e.getMessage());
24             return;
25         }
26         try {
27             Connection c = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/test", "sa", "");
28             c.createStatement().execute("SHUTDOWN");
29         } catch (SQLException sqe) {
30             System.err.println(sqe.getMessage());
31         }
32     }
33 }
34
35
Popular Tags