예제 #1
0
  public static void main(String args[]) {
    try {
      ORBInterface.initORB(args, null);
      OAInterface.initOA();

      String profileName = args[args.length - 3];

      int numberOfDrivers = JDBCProfileStore.numberOfDrivers(profileName);
      for (int index = 0; index < numberOfDrivers; index++) {
        String driver = JDBCProfileStore.driver(profileName, index);

        Class.forName(driver);
      }

      String databaseURL = JDBCProfileStore.databaseURL(profileName);
      String databaseUser = JDBCProfileStore.databaseUser(profileName);
      String databasePassword = JDBCProfileStore.databasePassword(profileName);
      String databaseDynamicClass = JDBCProfileStore.databaseDynamicClass(profileName);

      JDBCServiceImpl01 jdbcServiceImpl =
          new JDBCServiceImpl01(
              args[args.length - 2],
              databaseURL,
              databaseUser,
              databasePassword,
              databaseDynamicClass);
      BeforeCrashServicePOATie servant = new BeforeCrashServicePOATie(jdbcServiceImpl);

      OAInterface.objectIsReady(servant);
      BeforeCrashService service =
          BeforeCrashServiceHelper.narrow(OAInterface.corbaReference(servant));

      ServerIORStore.storeIOR(args[args.length - 1], ORBInterface.orb().object_to_string(service));

      System.out.println("Ready");

      ORBInterface.run();
    } catch (Exception exception) {
      System.err.println("JDBCServer01.main: " + exception);
      exception.printStackTrace(System.err);
    }
  }
예제 #2
0
  public static void main(String args[]) {
    try {
      ORBInterface.initORB(args, null);
      OAInterface.initOA();

      AITMatrixImpl04 aitMatrixImpl = new AITMatrixImpl04(16, 16);
      MatrixPOATie servant = new MatrixPOATie(aitMatrixImpl);

      OAInterface.objectIsReady(servant);
      Matrix aitMatrix = MatrixHelper.narrow(OAInterface.corbaReference(servant));

      ServerIORStore.storeIOR(
          args[args.length - 1], ORBInterface.orb().object_to_string(aitMatrix));

      System.out.println("Ready");

      ORBInterface.run();
    } catch (Exception exception) {
      System.err.println("Server04.main: " + exception);
    }
  }
예제 #3
0
  public static void main(String args[]) {
    try {
      ORBInterface.initORB(args, null);
      OAInterface.initOA();

      AfterCrashServiceImpl02 afterCrashServiceImpl =
          new AfterCrashServiceImpl02(args[args.length - 2].hashCode(), 0);
      AfterCrashServicePOATie servant = new AfterCrashServicePOATie(afterCrashServiceImpl);

      OAInterface.objectIsReady(servant);
      AfterCrashService afterCrashService =
          AfterCrashServiceHelper.narrow(OAInterface.corbaReference(servant));

      ServerIORStore.storeIOR(
          args[args.length - 1], ORBInterface.orb().object_to_string(afterCrashService));

      System.out.println("Ready");

      ORBInterface.run();
    } catch (Exception exception) {
      System.err.println("Server06.main: " + exception);
      exception.printStackTrace(System.err);
    }
  }