/*
* $Id: Main2.html,v 1.3 2003/08/26 17:04:38 suhrin Exp $
*
* Copyright (c) 1999-2002 Gnome Ltd. All Rights Reserved.
*
* This software is the confidential and proprietary information of
* Gnome Ltd. You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms
* of the license agreement you entered into with Gnome.
*/
package SK.gnome.dwarf.sample;
import SK.gnome.dwarf.main.*;
import SK.gnome.dwarf.config.XMLConfiguration;
/**
* Main server application instantiated via XML-based configuration.
*/
public class Main2
{
/**
* The main executive method.
*
* @param args array containing the URL argument
* @throws Exception if an error occurs
*/
public static void main(String[] args) throws Exception
{
// enable verbose operation
XMLConfiguration.setVerbosity(true);
// create new XMLConfiguration instance and read the given XML configuration data
XMLConfiguration cfg = new XMLConfiguration(args[0]);
// create new MainServer instance according to the given XML configuration
MainServer server = (MainServer)cfg.getService();
// initialize the server
server.init(null);
// start the server
server.start();
}
}
|