Package info.walnutstreet.vs.ps03v2.database

Source Code of info.walnutstreet.vs.ps03v2.database.DatabaseStart

/**
*
*/
package info.walnutstreet.vs.ps03v2.database;

import info.walnutstreet.vs.ps03v2.database.implementation.Database;
import info.walnutstreet.vs.ps03v2.database.interfaces.DatabaseInterface;

import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.sql.SQLException;

/**
* @author Christoph Gostner
* @version 0.3
*
*/
public class DatabaseStart {

  private static final int SERVER_PORT = 12000;

  /**
   * @param args
   * @throws RemoteException
   * @throws SQLException
   */
  public static void main(String[] args) throws RemoteException, SQLException {
    Registry registry = LocateRegistry.createRegistry(DatabaseStart.SERVER_PORT);
    registry.rebind(DatabaseInterface.class.getCanonicalName(), Database.getInstance());
    System.out.println("Database server up and running ...");
  }

}
TOP

Related Classes of info.walnutstreet.vs.ps03v2.database.DatabaseStart

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.