01: package allinone;
02:
03: import com.lutris.appserver.server.sql.*;
04: import com.lutris.util.*;
05: import org.enhydra.dods.*;
06: import java.sql.SQLException;
07:
08: import javax.swing.*;
09: import java.util.*;
10: import java.awt.*;
11: import java.awt.event.*;
12: import java.net.*;
13: import java.io.*;
14: import org.apache.log4j.Logger;
15: import org.apache.log4j.xml.DOMConfigurator;
16: import com.lutris.appserver.server.sql.*;
17: import allinone.data.person.*;
18:
19: /**
20: * The main class of DiscRack application.
21: *
22: * @author Sasa Bojanic
23: * @version 1.0
24: */
25: public class Test {
26: private static final String appTitle = "AllInOne DODS test";
27:
28: public static void main(String[] args) throws Throwable {
29: try {
30: String userDir = System.getProperty("user.dir");
31: DODS.startup(userDir + File.separator + "test.conf");
32: } catch (Exception ex) {
33: ex.printStackTrace();
34: return;
35: }
36: System.err.println("\n======== START ========");
37: DBTransaction dbTrans = null;/*
38: if (!(DODS.getDatabaseManager().getDatabaseManagerConfiguration().getAutoSave()||DODS.getDatabaseManager().getDatabaseManagerConfiguration().getAutoWrite())) {
39: System.err.println("\n======== TRANSACTION: null ========");
40: new CircusMultiReference().runTest(dbTrans);
41: new MultiReference().runTest(dbTrans);
42: new SelfReference().runTest(dbTrans);
43: new MultiTransTest().runTest(dbTrans);
44: System.err.println("================");
45: }
46: */
47: System.err.println("\n======== TRANSACTION set ========");/**/
48: dbTrans = DODS.getDatabaseManager().createTransaction();
49: new CircusMultiReference().runTest(dbTrans);
50: dbTrans.release();/**/
51: dbTrans = DODS.getDatabaseManager().createTransaction();
52: new MultiReference().runTest(dbTrans);
53: dbTrans.release();/**/
54: dbTrans = DODS.getDatabaseManager().createTransaction();
55: new MultiReference2().runTest(dbTrans);
56: dbTrans.release();
57: dbTrans = DODS.getDatabaseManager().createTransaction();
58: new SelfReference().runTest(dbTrans);
59: dbTrans.release();
60: dbTrans = DODS.getDatabaseManager().createTransaction();
61: new MultiTransTest().runTest(dbTrans);
62: dbTrans = DODS.getDatabaseManager().createTransaction();
63: new GetDOs().runTest(dbTrans);
64: dbTrans = DODS.getDatabaseManager().createTransaction();
65: new MassModification().runTest(dbTrans);/**/
66: System.err.println("======== FINISH ========");
67: DODS.shutdown();
68: }
69: }
|