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.

2559 questions
167
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,048
  • 6
  • 27
  • 32
63
votes
3 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
  • 9,061
  • 16
  • 53
  • 96
61
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,221
  • 3
  • 30
  • 47
57
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
  • 35,669
  • 13
  • 61
  • 92
55
votes
4 answers

what is RMI registry

What is RMI registry? What does it do?
saplingPro
  • 18,513
  • 51
  • 134
  • 185
52
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
  • 681
  • 2
  • 7
  • 16
47
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
  • 649
  • 1
  • 7
  • 14
46
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
  • 18,856
  • 18
  • 55
  • 69
44
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
  • 674
  • 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
  • 97,987
  • 90
  • 271
  • 355
29
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
  • 16,617
  • 21
  • 99
  • 150
29
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.…
28
votes
7 answers

java.rmi.NoSuchObjectException: no such object in table

I am writing a very simple RMI server, and I am seeing intermittent java.rmi.NoSuchObjectExceptions in the unit tests. I have a string of remote method calls on the same object, and while the first few go through, the later ones will sometimes…
Thilo
  • 241,635
  • 91
  • 474
  • 626
28
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
  • 283
  • 1
  • 3
  • 9
27
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
  • 926
  • 1
  • 14
  • 30
1
2 3
99 100