Last updated 08/18/2000
The Java 2 Platform, Micro Edition, Remote Method Invocation (RMI)
Profile is a J2ME Connected Device Configuration (CDC) Profile. The
J2ME CDC requires a complete implementation of the Java Virtual
Machine, including the core Java APIs,
java.io. Implementations of
the RMI Profile can only function on devices which include support for
the J2ME CDC and the Foundation Profile.
This document assumes that the reader is familiar with the Connected Limited Device Configuration (CLDC) specification available at
the CDC specification available at
the Foundation Profile specification available at
and the J2SE 1.3 RMI specification at
Note that J2ME Configurations and Profiles are defined in the Connected Limited Device Configuration Specification, Appendix 1.
This document specifies the subset of the J2SE 1.3 RMI API that is included in the RMI Profile. Information on the J2SE 1.3 RMI API is available at http://java.sun.com/j2se/1.3/docs/api/java/rmi/package-summary.html
This specification was developed under the Java Community Process.
More information on the Java Community Process is available at
The API for the RMI Profile for J2ME is the minimal subset of the J2SE 1.3 RMI API that may be used with J2ME. Where not explicitly stated, the RMI Profile conforms to the J2SE 1.3 RMI specification. Classes from the J2SE 1.3 RMI API can either be completely supported, or modified in ways allowed by the Configurations and Profiles Architecture Specification. Implementations of the RMI profile must support the following "client-oriented" interfaces and functionality specified by the RMI J2SE 1.3 API :
Full RMI call semantics
The RMI infrastructure supports passing serializable objects as the parameters and return values of remote method calls. When the code for the objects in a remote call is not available in a JVM which is receiving a given serialized or "marshalled" object, RMI will utilize dynamic class loading to make the class bytes for that object available to that JVM. Implementations of the RMI profile must implement full RMI call semantics including dynamic class loading.
This specification requires support of marshalled object
manipulation and persistence through the
The J2SE 1.3 RMI specification describes a wire protocol which enables remote method invocations to be carried out over a network. Except where noted below, implementations of this profile must support this wire protocol (known as JRMP or Java Remote Method Protocol).
This specification requires implementations of the RMI profile to support the "export" of unicast remote implementation objects. When a remote object implementation is exported to the RMI runtime, remote method invocations from clients of that object will be dispatched to and executed by the implementation object.
An implementation of the RMI profile must include these interfaces and support the RMI distributed garbage collection mechanism that allows remote implementation objects to be garbage collected when all remote and local references to that object have been discarded.
As of J2SE v1.2, RMI remote object stubs can contain a remote reference to an "Activatable" object. Activatable objects can be active or inactive. Remote references to activatable objects engage in an activation protocol that causes an inactive remote object to become active when a remote method is invoked on the object. The remote reference contained in a client stub object is responsible for engaging in the activation protocol. An implementation of the RMI profile must support a remote object reference type which will engage in the activation protocol.
An implementation of the RMI profile must support lookup of
remote objects through the use of the standard location interfaces
and the class
The following interfaces and functionality defined by the J2SE 1.3 RMI specification and public API are not part of this specification for the RMI profile:
The RMI protocol for remote call tunneling over HTTP. This protocol enables clients which are separated from remote objects by a firewall to "tunnel" remote method calls through the firewall to the object implementation.
The J2SE 1.3 RMI protocol for enabling multiple logical data streams to be multiplexed onto a single physical data stream. This protocol can enable two JVMs to invoke symmetric remote methods on each other even when only a single communication stream exists between the two JVMs.
The RMI mechanism for supporting activatable remote object implementations enables a remote object to become inactive when it is not in use and to become active when a client invokes a method on that implementation. Server side support for Activatable objects and the Remote Method Invocation Daemon (rmid) are not part of this specification.
The following J2SE 1.3 RMI APIs related to the implementation model for an "Activatable" object are not part of the RMI Profile API:
See the properties section below for the missing RMI activation property.
The following RMI J2SE 1.3 APIs that were deprecated as of J2SE 1.3 are not part of this specification:
java.rmi.server.RemoteRef.newCall(RemoteObject, Operation, int, long)
As of JDK1.1, RMI supported a single protocol for communication between RMI stubs and the RMI runtime which was used to carry out remote method invocations. In J2SE 1.2, an improved version of this protocol, was introduced into RMI. The older, JDK 1.1 stub protocol is not part of this specification. The RMI profile will only support stubs that use the new 1.2 stub protocol. Stubs which are compatible with both the 1.1 and 1.2 stub protocols may be used with the RMI profile, but all RMI profile communication must be carried out over the 1.2 stub protocol.
The J2SE 1.3 specification describes a tool that generates and compiles for RMI stubs and skeletons (known as "rmic"). This RMI profile specification does not require such a stub and skeleton compiler utility. Applications which need to generate RMI stub classes to be used with an implementation of the RMI profile, should use the stub compiler which is part of the J2SE 1.3 RMI distribution.
Please see the following URLs for further information on rmic:
For the SolarisTM operating environment:
For the Microsoft Windows platform:
The RMI Profile requires implementations of the Foundation Profile
and the J2ME CDC. The RMI Profile is not supported by the J2ME
Connected Limited Device Configuration (CLDC).
The following is a list of classes used in J2ME-CDC. The details can be seen in the javadoc generated section of this specification.
class java.lang.Object class java.rmi.activation.ActivationID (implements java.io.Serializable) class java.rmi.dgc.Lease (implements java.io.Serializable) class java.rmi.registry.LocateRegistry class java.rmi.MarshalledObject (implements java.io.Serializable) class java.rmi.Naming class java.rmi.server.ObjID (implements java.io.Serializable) class java.rmi.server.Operation class java.rmi.server.RemoteObject (implements java.rmi.Remote, java.io.Serializable) class java.rmi.server.RemoteServer class java.rmi.server.UnicastRemoteObject class java.rmi.server.RemoteStub class java.rmi.server.RMIClassLoader class java.rmi.server.RMISocketFactory (implements java.rmi.server.RMIClientSocketFactory, java.rmi.server.RMIServerSocketFactory) class java.lang.SecurityManager class java.rmi.RMISecurityManager class java.lang.Throwable (implements java.io.Serializable) class java.lang.Exception class java.rmi.activation.ActivationException class java.rmi.activation.UnknownObjectException class java.rmi.AlreadyBoundException class java.lang.CloneNotSupportedException class java.rmi.server.ServerCloneException class java.io.IOException class java.rmi.RemoteException class java.rmi.AccessException class java.rmi.activation.ActivateFailedException class java.rmi.ConnectException class java.rmi.ConnectIOException class java.rmi.server.ExportException class java.rmi.server.SocketSecurityException class java.rmi.MarshalException class java.rmi.NoSuchObjectException class java.rmi.ServerError class java.rmi.ServerException class java.rmi.StubNotFoundException class java.rmi.UnexpectedException class java.rmi.UnknownHostException class java.rmi.UnmarshalException class java.rmi.NotBoundException class java.rmi.server.ServerNotActiveException class java.rmi.server.UID (implements java.io.Serializable) class java.rmi.dgc.VMID (implements java.io.Serializable) interface java.rmi.Remote interface java.rmi.activation.Activator interface java.rmi.dgc.DGC interface java.rmi.registry.Registry interface java.rmi.server.RemoteCall interface java.rmi.server.RMIClientSocketFactory interface java.rmi.server.RMIFailureHandler interface java.rmi.server.RMIServerSocketFactory interface java.io.Serializable interface java.io.Externalizable interface java.rmi.server.RemoteRef interface java.rmi.server.Unreferenced
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2000 Sun Microsystemms, Inc. 901 San Antonio Road Palo, Alto, California, 94303, U.S.A All Rights Reserved.