public Connection setConn() {
        try {
            /*
            The connection specifies create=true to cause
            the database to be created. To remove the database,
            remove the directory AttackDB and its contents.
            The directory AttackDB will be created under
            the directory that the system property
            derby.system.home points to, or the current
            directory if derby.system.home is not set.
             */

            if (this.databaseName != null) {
                if (conn != null) {
                    if (!conn.isClosed()) {
                        conn.close();
                    }
                }
                conn = DriverManager.getConnection(protocol + this.databaseName + ";create=false", props);

                return conn;
            }
        } catch (Throwable e) {
            System.out.println("exception thrown:");

            if (e instanceof SQLException) {
                printSQLError((SQLException) e);
            } else {
                e.printStackTrace();
            }
        }
        return null;
    }