KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > derbyTesting > functionTests > tests > upgradeTests > Upgrade_10_1_10_2


1 /*
2
3 Derby - org.apache.derbyTesting.functionTests.tests.upgradeTests.Upgrade_10_1_10_2
4
5 Licensed to the Apache Software Foundation (ASF) under one or more
6 contributor license agreements. See the NOTICE file distributed with
7 this work for additional information regarding copyright ownership.
8 The ASF licenses this file to You under the Apache License, Version 2.0
9 (the "License"); you may not use this file except in compliance with
10 the License. You may obtain a copy of the License at
11
12    http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19
20 */

21 package org.apache.derbyTesting.functionTests.tests.upgradeTests;
22
23 import java.net.MalformedURLException JavaDoc;
24 import java.sql.SQLException JavaDoc;
25
26 /**
27  * Test upgrade from 10.1 to 10.2
28  */

29 public class Upgrade_10_1_10_2 {
30
31     public static void main(String JavaDoc[] args) {
32         
33         int oldMajorVersion = 10;
34         int oldMinorVersion = 1;
35         int newMajorVersion = 10;
36         int newMinorVersion = 2;
37         boolean allowPreReleaseUpgrade = true;
38         
39         try {
40             UpgradeTester upgradeTester = new UpgradeTester(
41                                             oldMajorVersion, oldMinorVersion,
42                                             newMajorVersion, newMinorVersion,
43                                             allowPreReleaseUpgrade);
44             upgradeTester.runUpgradeTests();
45         } catch(MalformedURLException JavaDoc mue) {
46             System.out.println("MalformedURLException: " + mue.getMessage());
47             mue.printStackTrace();
48         } catch (SQLException JavaDoc sqle) {
49             System.out.println("SQLException:");
50             UpgradeTester.dumpSQLExceptions(sqle);
51         } catch (Exception JavaDoc e) {
52             System.out.println("Exception: " + e.getMessage());
53             e.printStackTrace();
54         }
55     }
56 }
57
Popular Tags