src/main/java/pityoulish/pod/server/Main.java
public static void main(String[] args)
    throws Exception
  {
    readEnvVars();

    // The server name or IP address has to be set as a system property.
    // Otherwise, stubs will point to some version of 'localhost' and be
    // useless on other machines. Report whether the property is set.
    pityoulish.jrmi.server.Main.checkForHostnameProperty();

    LogConfig.configure(Main.class);
    LOGGER.log(Level.INFO, "starting Message Board server");

    // use a thread-safe wrapper around the unsafe message board impl
    MixedMessageBoard mmb  =
      new MixedMessageBoardSync(new MixedMessageBoardImpl(board_capacity));
    TicketManager tim  = new DefaultTicketManager();

    mmb.putSystemMessage(null, Catalog.SYSMSG_OPEN.lookup());
    mmb.putSystemMessage(null,(Catalog.SYSMSG_CAPACITY_1
                               .format(board_capacity)));


    // initialize Java RMI external interface

    RemoteMessageBoardImpl  rmbi = new RemoteMessageBoardImpl(mmb, tim);
    RemoteTicketIssuerImpl  rtii = new RemoteTicketIssuerImpl(tim, false);

    Remote rmbistub = UnicastRemoteObject.exportObject(rmbi, jrmi_objects_port);
    Remote rtiistub = UnicastRemoteObject.exportObject(rtii, jrmi_objects_port);

    //@@@ NLS light?
    System.out.println(rmbistub);
    System.out.println(rtiistub);

    Registry mainreg =
      pityoulish.jrmi.server.Main.createDefaultRegistry(jrmi_registry_port);
    mainreg.bind(RegistryNames.MESSAGE_BOARD.lookupName, rmbi);
    mainreg.bind(RegistryNames.TICKET_ISSUER.lookupName, rtii);


    // initialize binary protocol external interface

    SocketHandler shandler =
      pityoulish.sockets.server.Main.createTLVSocketHandler(mmb, tim,
                                                            false, false);
    shandler.startup(sockets_port, 0); // adjusting the backlog is pointless

    //@@@ NLS light?
    System.out.println(shandler);
    System.out.println(shandler.getServerSocket());

    // no planned shutdown
  }
/**
   * Main entry point.
   *
   * @param args        ignored
   *
   * @throws Exception  in case of a problem
   */
Main entry point.
@param args        ignored

@throws Exception  in case of a problem
Main entry point . @param args ignored @throws Exception in case of a problem
public static void main(String[] args)
    throws Exception
  {
    readEnvVars();
    pityoulish.jrmi.server.Main.checkForHostnameProperty();
    LogConfig.configure(Main.class);
    LOGGER.log(Level.INFO, "starting Message Board server");
    MixedMessageBoard mmb  =
      new MixedMessageBoardSync(new MixedMessageBoardImpl(board_capacity));
    TicketManager tim  = new DefaultTicketManager();
    mmb.putSystemMessage(null, Catalog.SYSMSG_OPEN.lookup());
    mmb.putSystemMessage(null,(Catalog.SYSMSG_CAPACITY_1
                               .format(board_capacity)));
    RemoteMessageBoardImpl  rmbi = new RemoteMessageBoardImpl(mmb, tim);
    RemoteTicketIssuerImpl  rtii = new RemoteTicketIssuerImpl(tim, false);
    Remote rmbistub = UnicastRemoteObject.exportObject(rmbi, jrmi_objects_port);
    Remote rtiistub = UnicastRemoteObject.exportObject(rtii, jrmi_objects_port);
    System.out.println(rmbistub);
    System.out.println(rtiistub);
    Registry mainreg =
      pityoulish.jrmi.server.Main.createDefaultRegistry(jrmi_registry_port);
    mainreg.bind(RegistryNames.MESSAGE_BOARD.lookupName, rmbi);
    mainreg.bind(RegistryNames.TICKET_ISSUER.lookupName, rtii);
    SocketHandler shandler =
      pityoulish.sockets.server.Main.createTLVSocketHandler(mmb, tim,
                                                            false, false);
    shandler.startup(sockets_port, 0); 
    System.out.println(shandler);
    System.out.println(shandler.getServerSocket());
  }
public static void main ( String [ ] args ) throws Exception { readEnvVars ( ) ; pityoulish . jrmi . server . Main . checkForHostnameProperty ( ) ; LogConfig . configure ( Main . class ) ; LOGGER . log ( Level . INFO , "starting Message Board server" ) ; MixedMessageBoard mmb = new MixedMessageBoardSync ( new MixedMessageBoardImpl ( board_capacity ) ) ; TicketManager tim = new DefaultTicketManager ( ) ; mmb . putSystemMessage ( null , Catalog . SYSMSG_OPEN . lookup ( ) ) ; mmb . putSystemMessage ( null , ( Catalog . SYSMSG_CAPACITY_1 . format ( board_capacity ) ) ) ; RemoteMessageBoardImpl rmbi = new RemoteMessageBoardImpl ( mmb , tim ) ; RemoteTicketIssuerImpl rtii = new RemoteTicketIssuerImpl ( tim , false ) ; Remote rmbistub = UnicastRemoteObject . exportObject ( rmbi , jrmi_objects_port ) ; Remote rtiistub = UnicastRemoteObject . exportObject ( rtii , jrmi_objects_port ) ; System . out . println ( rmbistub ) ; System . out . println ( rtiistub ) ; Registry mainreg = pityoulish . jrmi . server . Main . createDefaultRegistry ( jrmi_registry_port ) ; mainreg . bind ( RegistryNames . MESSAGE_BOARD . lookupName , rmbi ) ; mainreg . bind ( RegistryNames . TICKET_ISSUER . lookupName , rtii ) ; SocketHandler shandler = pityoulish . sockets . server . Main . createTLVSocketHandler ( mmb , tim , false , false ) ; shandler . startup ( sockets_port , 0 ) ; System . out . println ( shandler ) ; System . out . println ( shandler . getServerSocket ( ) ) ; }
Main entry point.
Main entry point .
// The server name or IP address has to be set as a system property. // Otherwise, stubs will point to some version of 'localhost' and be // useless on other machines. Report whether the property is set. // use a thread-safe wrapper around the unsafe message board impl // initialize Java RMI external interface //@@@ NLS light? // initialize binary protocol external interface // adjusting the backlog is pointless //@@@ NLS light? // no planned shutdown