-port -log rmid Command-Line Arguments

Activatable.unregisterserverID; } Unregistering a server with the activation daemon does not cause the server to stop listening for remote method invocations. It merely means the activation daemon wont restart the server if it goes down. You really do need to call all three methods in order to completely shut down a se rver so it wont be reactivated.

17.6.5 rmid Command-Line Arguments

The activation daemon accepts four command-line arguments. Three affect the activation daemon, and one affects the JVMs created by the activation daemon. The arguments that affect the activation daemon are: -port , -log , and -stop . -C affects the JVMs launched by the activation daemon.

17.6.5.1 -port

When the activation daemon launches a JVM, it also launches an RMI server inside the new JVM, which handles the details of creating server objects inside the newly launched JVM. The activation daemon and the server need to send messages to each other. This communication is bootstrapped by an instance of an RMI registry inside the activation daemon. The actual instance of ActivationSystem that provides that activation daemons core functionality is bound into this registry under the name java.rmi.activation.ActivationSystem . The -port property specifies the port on which activation daemons registry listens. Thus, if you know the port, you can communicate with the activation system directly, as in the following code snippet: ActivationSystem system; system = ActivationSystemNaming.lookup:portjava.rmi.activation. ActivationSystem; The static methods on the Activatable class essentially do this. That is, there is no functional difference between calling a static method on Activatable that registers an ActivationDesc with the activation daemon and getting a direct handle to the ActivationSystem yourself. We used the following three lines of code to register an account with the activation daemon: ActivationDesc aD = createActivationDescowner, money; Account account = Account Account_Impl.registeraD; Naming.rebindowner, account; We could have, instead, done the following: ActivationSystem system; system = ActivationSystemNaming.lookup:1098java.rmi.activation. ActivationSystem; ActivationDesc aD = createActivationDescowner, money; system.registeraD; Naming.rebindowner, account; This flag takes an argument, as follows: rmid -port 1967 If no value is specified for -port , it defaults to 1098.

17.6.5.2 -log

rmid automatically creates and writes to a log file. In fact, you cant prevent rmid from doing so. The only control you have over the rmid log is the directory in which it will be written. This is what the -log parameter specifies. rmid -log directory-to-put-log-file-in If you dont specify a directory, the log file will be written to the current working directory when the activation daemon was started. The rmid log always has a name of the form Logfile. , where is an integer. The first time you run rmid with a particular directory for logging, rmid will create and use a log file named Logfile.1 . On subsequent executions, rmid will create files named Logfile.2 , Logfile.3 , and so on.

17.6.5.3 -stop