Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RMI compatibility between JVM implementations

Tags:

java

rmi

Are there any problems when calling methods over RMI when the server is running on an IBM JVM and the client on a Sun/Oracle JVM or vice versa.

In other words: Is the RMI protocol (not RMI-IIOP) in the Java specification and is it tested by the JCK?

I have found the documentation about the RMI protocol from Oracle but have not found a hint if the documentation is also valid for other JVM implementations.

like image 902
Andi Hofi Avatar asked Dec 19 '10 14:12

Andi Hofi


People also ask

Is Java RMI still used?

RMI and CORBA(Common Object Request Broker Architecture) attempt to solve a problem that people thought was important in the early 1990s. However, today we can't consider RMI as modern technology and nowadays we have REST, SOAP as the de-facto standards for communicating with remote services.

What is RMI explain advantages of using RMI?

Java Remote Method Invocation (RMI) allows you to write distributed objects using Java. This paper describes the benefits of RMI, and how you can connect it to existing and legacy systems as well as to components written in Java. RMI provides a simple and direct model for distributed computation with Java objects.

What is compatibility in Java?

Source: Source compatibility concerns translating Java source code into class files including whether or not code still compiles at all. Binary: Binary compatibility is defined in The Java Language Specification as preserving the ability to link without error.

Where is Java RMI used?

RMI stands for Remote Method Invocation. It is a mechanism that allows an object residing in one system (JVM) to access/invoke an object running on another JVM. RMI is used to build distributed applications; it provides remote communication between Java programs.


1 Answers

The RMI JRMP protocol is defined in the Java RMI Specification. That means it must be the same across all Java implementations, barring bugs, and barring non-Java implementations such as GNU CLASSPATH. The biggest problem you will encounter is mismatching serialVersionUIDs: you need to be careful to define them for all your own classes, and you need to avoid serializing JDK classes that aren't guaranteed to have stable serialized formats, e.g. Swing classes, as the Javadoc for every one of them tells you.

like image 117
user207421 Avatar answered Oct 13 '22 16:10

user207421