Java remote method invocation: Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted Visual edit Mobile edit Mobile web edit
No edit summary
Tags: Reverted references removed Visual edit Mobile edit Mobile web edit
Line 3:
In [[computing]], the '''Java Remote Method Invocation''' ('''Java RMI''') is a [[Java (programming language)|Java]] [[Application programming interface|API]] that performs [[remote method invocation]], the object-oriented equivalent of [[remote procedure call]]s (RPC), with support for direct transfer of [[Serialization#Java|serialized]] Java classes and [[Distributed Garbage Collection|distributed garbage-collection]].
 
The original implementation depends on [[Java virtual machine|Java Virtual Machine]] (JVM) class-representation mechanisms and it thus only supports making calls from one JVM to another. The protocol underlying this Java-only implementation is known as Java Remote Method Protocol (JRMP). In order to support code running in a non-JVM context, programmers later developed a [[Common Object Request Broker Architecture|CORBA]] version.
 
Usage of the term '''RMI''' may denote solely the programming interface or may signify both the API and JRMP, [[IIOP]], or another implementation, whereas the term [[RMI-IIOP]] (read: RMI over [[IIOP]]) specifically denotes the RMI interface delegating most of the functionality to the supporting [[CORBA]] implementation.
Line 85:
</syntaxhighlight>
 
Before running this example, we need to make a 'stub' file for the interface we used. For this task we have the RMI compiler - 'rmic'
*Note: we make a stub file from the '*.class' file with the implementation of the remote interface, not from the '*.java' file.inte
 
rmic RmiServer
 
Note that since version 5.0 of J2SE support for dynamically generated stub files has been added, and rmic is only provided for backwards compatibility with earlier runtimes,<ref>{{cite web|title=Java RMI Release Notes|url=http://docs.oracle.com/javase/1.5.0/docs/guide/rmi/relnotes.html|publisher=Oracle|access-date=9 May 2012}}</ref> orr for programs that don't provide an explicit port number (or zero) when exporting remote objects, which is required for generated stubs to be possible, as described in the Javadoc for UnicastRemoteObject. See the comment in the constructor above.
 
==tutorial - a good starting point to learn RMI.==
==References==
*
{{reflist}}
* [http://download.oracle.com/javase/tutorial/rmi/index.html The Java RMI tutorial] - a good starting point to learn RMI. Also check the [http://java.sun.com/j2se/1.5.0/docs/guide/rmi/hello/hello-world.html Hello World in RMI]
 
* y good for training JavaRMI and as reference
==External links==
* [http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/index.html The] RMI page in the JDK docs]
*{{cite web |title=Remote Method Invocation Home |url=http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136424.html |website= Oracle Technology Network for Java Developers |publisher=[[Oracle Corporation]] |___location=Redwood Shores, CA, USA |access-date=2014-07-14}}
* [http://download.oracle.com/javase/tutorial/rmi/index.html The Java RMI tutorial] - a good starting point to learn RMI. Also check the [http://java.sun.com/j2se/1.5.0/docs/guide/rmi/hello/hello-world.html Hello World in RMI]
* [http://java.sun.com/developer/onlineTraining/rmi/RMI.html the Java RMI online training] - Very good for training JavaRMI and as reference
* [http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/index.html The RMI page in the JDK docs]
* {{Javadoc:SE|package=java.rmi|java/rmi}} (Sun's Java API Reference for the RMI package)
*
* {{cite web | author1= Ann Wollrath | author2= Roger Riggs | author3 = Jim Waldo |author3-link=Jim Waldo
* [http://docs.oracle.com/cd/E12840_01/wls/docs103/rmi/rmi_intro.html Programming WebLogic RMIWebLo] - an introduction to RMI in Oracle Weblogic.
| title= A Distributed Object Model for the Java System
| url=http://pdos.csail.mit.edu/6.824/papers/waldo-rmi.pdf |archive-url=https://ghostarchive.org/archive/20221010/http://pdos.csail.mit.edu/6.824/papers/waldo-rmi.pdf |archive-date=2022-10-10 |url-status=live | access-date= 2009-02-11}}
* [http://docs.oracle.com/cd/E12840_01/wls/docs103/rmi/rmi_intro.html Programming WebLogic RMI] - an introduction to RMI in Oracle Weblogic.
* [http://notes.corewebprogramming.com/student/RMI.pdf General Remote Method Invocation]