Questions tagged [rmi]

Remote Method Invocation (RMI) is Java's object-oriented remote procedure call (RPC) mechanism.

Java's Remote Method Invocation (RMI) is the standard object-oriented RPC mechanism in all versions of Java. RMI is built upon the Java platform's object serialization mechanism, provides a simple naming service, and provides a distributed garbage collection (DGC) mechanism.

There are at least three RMI protocols: JRMP: Java Remote Method Protocol, built into the JDK; RMI/IIOP: Internet Inter-Orb Protocol, from CORBA, built into the JDK; and JERI: Java Extensible Remote Invocation, which was the subject of two rejected JSRs and eventually appeared in Jini 2.0, whose main purpose was to greatly improve several aspects of secure RMI. RMI/IIOP is the standard protocol for J2EE, although various J2EE vendors have their own protocols as well.

2607 questions
175
votes
8 answers

What is the difference between Java RMI and RPC?

What is the actual difference between Java RMI and RPC? I have read in some places that RMI uses Objects?
Aran
  • 3,298
  • 6
  • 32
  • 33
71
votes
4 answers

Why Java opens 3 ports when JMX is configured?

I run my Java program with JDK7 on Centos6. I enable JMX using the following options: JAVA_OPTS="${JAVA_OPTS} -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9123 -Dcom.sun.management.jmxremote.ssl=false…
Michael
  • 10,063
  • 18
  • 65
  • 104
62
votes
20 answers

Is it possible for a thread to Deadlock itself?

Is it technically possible for a thread in Java to deadlock itself? I was asked this at an interview a while back and responded that it wasn't possible but the interviewer told me that it is. Unfortunately I wasn't able to get his method on how to…
Pram
  • 2,261
  • 3
  • 31
  • 50
59
votes
3 answers

Web Services vs EJB vs RMI, advantages and disadvantages?

My web server would be overloaded quickly if all the work were done there. I'm going to stand up a second server behind it, to process data. What's the advantage of EJB over RMI, or vice versa? What about web services (SOAP, REST)?
Dean J
  • 39,360
  • 16
  • 67
  • 93
57
votes
14 answers

java.rmi.ConnectException: Connection refused to host: 127.0.1.1;

java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is: java.net.ConnectException: Connection refused at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619) at…
heythatsmekri
  • 781
  • 2
  • 8
  • 16
56
votes
4 answers

what is RMI registry

What is RMI registry? What does it do?
saplingPro
  • 20,769
  • 53
  • 137
  • 195
49
votes
1 answer

Illegal remote method in java

It's the first time I use java Rmi*. I have a custom class which extends UnicastRemoteObject and implements an interface which extends remote. I think that I have implemented the methods of the interface correctly in the class but still I get an…
Range
  • 689
  • 1
  • 8
  • 14
48
votes
9 answers

RMI vs. Web Services. What's best for Java2Java remoting?

I'm new to both Web Services and RMI and I wonder which is the better way to do remoting between different web applications, when these applications are all written in Java, that is when different programming languages don't matter (which would be…
cretzel
  • 19,864
  • 19
  • 58
  • 71
45
votes
5 answers

How to connect to a java program on localhost jvm using JMX?

I should connect to a java program on localhost jvm using JMX. In other words I want to develop a JMX client to config a java program on localhost. Don't recommend using JConsole! JConsole is not suitable because it is general JMX client and have…
mjafari
  • 694
  • 2
  • 12
  • 22
39
votes
2 answers

What is the difference between Java RMI and JMS?

When designing an distributed application in Java there seem to be a few technologies that address the same kind of problem. I have briefly read about Java Remote Method Invocation and Java Message Service, but it is hard to really see the…
Jonas
  • 121,568
  • 97
  • 310
  • 388
34
votes
5 answers

InvalidClassException: ; incompatible types for field

I am getting some sporadic exceptions when making polling RMI calls from one VM to another. The classpaths look consistent between VMs. I am using 64 bit java - the jres are consistent (jdk/v1.6.0_23-64bit). There is an inconsistency in the…
a_g
  • 341
  • 3
  • 4
31
votes
6 answers

Java: no security manager: RMI class loader disabled

Hi I have RMI application and now I try to invoke some methods at server from my client. I have following code: public static void main(final String[] args) { try { //Setting the security manager System.setSecurityManager(new…
Xorty
  • 18,367
  • 27
  • 104
  • 155
30
votes
2 answers

resolve a java.util.ArrayList$SubList notSerializable Exception

I am using SubList function on an object of type List. The problem is that I am using RMI and because the java.util.ArrayList$SubList is implemented by a non-serializable class I got the Exception described above when I try to pass the resulting…
Othmane
  • 1,094
  • 2
  • 17
  • 33
30
votes
4 answers

the significance of java RMI please?

Why do people use RMI, or when should I use RMI? I read those tutorials about RMI on oracle's website. But it doesn't provide enough practical examples. To my understanding, software should have its modules as "unrelated and separated" as possible.…
29
votes
9 answers

running rmi server, classnotfound

Hi I'm trying to run a java application that binds a class to the naming server, but i constantly get a ClassNotFoundException First I start the registry: rmiregistry then from eclipse I try to execute the server but get this…
Maurizio Pozzobon
  • 293
  • 1
  • 3
  • 9
1
2 3
99 100