Java SE 7 Remote Method Invocation (RMI)-related APIs &
Developer Guides (original) (raw)
Overview
Java Remote Method Invocation (Java RMI) enables the programmer to create distributed Java technology-based to Java technology-based applications, in which the methods of remote Java objects can be invoked from other Java virtual machines, possibly on different hosts. RMI uses object serialization to marshal and unmarshal parameters and does not truncate types, supporting true object-oriented polymorphism.
Security Recommendations
See RMI Security Recommendations to improve the security of your RMI applications.
API Specification
- java.rmi Package
- java.rmi.dgc Package
- java.rmi.registry Package
- java.rmi.server Package
- java.rmi.activation Package
Architecture and Functional Specification
Tutorials
- Getting Started
The Getting Started Tutorial shows you the steps to follow to create a distributed version of the classic Hello World program using Java RMI. The Hello World applet makes a remote method call to the server from which it was downloaded to retrieve the message "Hello World!" - Using Custom Socket Factories with Java RMI
The "Using Custom Socket Factories with Java RMI" tutorial shows you how to create a version of the distributed Hello World program in which the Java RMI runtime uses sockets of a type chosen by the programmer. This tutorial also includes a discussion of how Java RMI can be used over SSL sockets. - The Activation Tutorials
The Activation Tutorials describe how to use the Java RMI APIs to implement, to register, and to use activatable objects. Each tutorial presents a different way to implement an activatable object. All tutorials use the same parameterized setup program that registers information about an activatable object with the Java RMI Activation System Daemon (rmid). - Configuringinetd to Launch rmid
The Internet services daemoninetd
, supported on the Solaris Operating System (Solaris OS), provides an alternative to starting up services at system boot time. This daemon, a server process for Internet standard services, can be configured to start services on demand. - Designing Services to be Launched from inetd
This tutorial describes how to structure a service program (employing a specially exported local registry) so that the service can be started frominetd
when clients connect to the service's local registry, and how to configureinetd
to launch the service program. - Dynamic code downloading using Java RMI (Using the java.rmi.server.codebaseProperty)
One of the most significant capabilities of the Java platform is the ability to dynamically download Java software from any URL to a VM running in a separate process, usually on a different physical system. The result is that a remote system can run a program, for example an applet, which has never been installed on its disk. This tutorial describes the use of dynamic code downloading in a Java system, and how it can be used with Java RMI. - The Java RMI trail of The Java Tutorial
This trail provides a brief overview of the Java RMI system and then walks through a complete client/server example that uses Java RMI's unique capabilities to load and to execute user-defined tasks at runtime. The server in the example implements a generic compute engine, which the client uses to compute the value of pi.
Enhancements
- Enhancements in JDK 7
Describes changes in JDK 7 Update 21, where the default value of the RMI propertyjava.rmi.server.useCodebaseOnly
has been set totrue
. In previous releases the default value wasfalse
. - Java RMI Release Notes
The release notes describe enhancements and changes to the Java RMI APIs and implementation, as well to the associated tools,rmic
,rmiregistry
, andrmid
.
More Information
- The Java RMI Home Page
- Java RMI Tools (rmic, rmiregistry, rmid)
- The Java RMI and Object Serialization FAQ
- Preservation of Mail Lists and Documentation External to the River Project
- Useful java.rmi Properties
- Useful sun.rmi Properties
- Java RMI Implementation Logging
- Applying the Factory Pattern to Java RMI
- Using Java RMI with SSL