- Unix Commands Reference
- Unix - Tutorial Home
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
rmid - Unix, Linux Command
NAMErmid - RMI activation system daemon
SYNOPSISrmid [ options ]
DESCRIPTIONThe rmid tool starts the activation system daemon. Before activatable objects can be either registered with the activation system or activated in a Java VM, the activation system daemon must be started. See the RMI Specification and Activation Tutorials for details on how to write programs that use activatable remote objects.
The daemon can be started by executing the rmid command, and specifying a security policy file, as follows:
example% rmid -J-Djava.security.policy=rmid.policy
Note: When running Suns implementation of rmid, by default you will need to specify a security policy file so that rmid can verify whether or not the information in each ActivationGroupDesc is allowed to be used to launch a JVM for an activation group. Specifically, the command and options specified by the CommandEnvironment and any Properties passed to an ActivationGroupDescs constructor must now be explicitly allowed in the security policy file for rmid. The value of the sun.rmi.activation.execPolicy property dictates the policy that rmid uses to determine whether or not the information in an ActivationGroupDesc may be used to launch a JVM for an activation group.
Executing rmid by default
|o||starts the Activator and an internal registry on the default port, 1098, and|
|o||binds an ActivationSystem to the name java.rmi.activation.ActivationSystem in this internal registry.|
To specify an alternate port for the registry, you must specify the -port option when starting up rmid. For example,
rmid -J-Djava.security.policy=rmid.policy -port 1099
starts the activation system daemon and a registry on the registrys default port, 1099.
Starting rmid from inetd/xinetdAn alternative to starting rmid from the command line is to configure inetd (Solaris) or xinetd (Linux) to start rmid on demand.
When rmid starts up, it attempts to obtain an inherited channel (inherited from inetd/xinetd) by invoking the System.inheritedChannel method. If the inherited channel is null, then rmid was started from the command line, and it starts up as described above.
If the inherited channel is not an instance of java.io.channels.ServerSocketChannel, rmid exits.
If the inherited channel is a ServerSocketChannel instance, then rmid uses the java.net.ServerSocket obtained from the ServerSocketChannel as the server socket that accepts requests for the remote objects it exports, namely the registry in which the java.rmi.activation.ActivationSystem is bound and the java.rmi.activation.Activator remote object.
The rmid tool, when started from inetd/xinetd, behaves the same as when it is started from the command line, except:
|o Output printed to System.err is redirected|
|to a file. This file is located in the directory specified by the java.io.tmpdir system property (typically /var/tmp or /tmp) with the prefix "rmid-err" and the suffix "tmp".|
|o The -port option is disallowed. If this|
|option is specified, rmid will exit with an error message.|
|o The -log option is required. If this option|
|is not specified, rmid will exit with an error message.|
Specifies an option that is passed as a command-line argument
to each child process (activation group) of
rmid when that
process is created.
For example, you could pass a property to each Java
virtual machine spawned by the activation system daemon:
This ability to pass command-line arguments o child processes can be useful for debugging. For example, the following command:
will enable server-call logging in all child JVMs.
Specifies an option that is passed to the
java interpreter running
rmid. For example, to specify that
rmid use a policy file named
-J option can be used to define the
java.security.policy property on
rmids command line.
Specifies the policy that
rmid employs to check commands and command-line options used to
launch the JVM in which an activation group runs.
Please note that this option exists only in Suns
implementation of the RMI activation daemon.
If this property is not specified on the command line,
the result is the same as if
-J-Dsun.rmi.activation.execPolicy=default were specified.
The possible values of
policy can be
default, policyClassName, or
|Specifies the name of the directory the activation system daemon uses to write its database and associated information. The log directory defaults to creating a directory, log, in the directory in which the rmid command was executed.|
Specifies the port
rmids registry uses.
The activation system daemon binds the
ActivationSystem, with the name
java.rmi.activation.ActivationSystem, in this registry.
ActivationSystem on the local machine can be obtained using
Naming.lookup method call:
system = (ActivationSystem)
ActivationSystem system; system = (ActivationSystem) Naming.lookup("//:port/java.rmi.activation.ActivationSystem");
|-stop||Stops the current invocation of rmid, for a port specified by the -port option. If no port is specified, it will stop the rmid running on port 1098.|
Used to provide the system a path to user-defined classes.
Directories are separated by colons.
|RMI Specification @|