import csis626.*;
import java.rmi.*;

/**
   Server program for client to connect to utilize 
   remote object DB for extracting information about
   the student from the MYSQL database GRAD_DEGREE
*/
public class DBServer
{  
   public static void main(String[] args)
   {
      System.setSecurityManager(new RMISecurityManager());

      try
      {
         Naming.rebind("MyDatabase", new DB());
         System.out.println("DB Server is ready.");
         while(true)
         {
            /* Just trying to keep this alive to serve clients */
         }
      }
      catch (Exception e)
      {
         System.out.println("DB Server failed: " + e);
      }
   }
} /* End class DBServer */
