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
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
  • 257,207
  • 101
  • 511
  • 656
27
votes
9 answers

What port is used by Java RMI connection?

May I know what port is used by Java RMI connection? If I want to connect a Java client application to a Java server application using RMI connection, what port I need to open at the server machine so that the client application can connect to it? I…
kwc
  • 317
  • 1
  • 5
  • 7
26
votes
11 answers

Communication between local JVMs

My question: What approach could/should I take to communicate between two or more JVM instances that are running locally? Some description of the problem: I am developing a system for a project that requires separate JVM instances to isolate certain…
obfuscation
  • 1,023
  • 3
  • 16
  • 23
25
votes
7 answers

what is stub on the "server" and what does skeleton mean?

What does stub do on the server side ? And what is a skeleton ? This is a diagram from wikipedia. I installed stub both on the server machine and the client machine. I understand that stub helps in the networking on the client side but what does…
program-o-steve
  • 2,630
  • 15
  • 48
  • 67
24
votes
7 answers

How to have JMX bind to a specific interface?

I am currently starting my Java VM with the com.sun.management.jmxremote.* properties so that I can connect to it via JConsole for management and monitoring. Unfortunately, it listens on all interfaces (IP addresses) on the machine. In our…
Marc Novakowski
  • 44,628
  • 11
  • 58
  • 63
23
votes
4 answers

Which NIO library (Netty, Grizzly, kryonet, ...) for simple backend server implementation in Java?

Our frontend is simple Jetty (might be replaced with Tomcat later on) server. Through servlets, we are providing a public HTTP API (more or less RESTful) to expose our product functionality. In the backend, we have a Java process which does several…
Japer D.
  • 754
  • 1
  • 9
  • 18
22
votes
8 answers

IntelliJ Idea IDE using port 1099

I'm using IntelliJ Idea Community Edition IDE and I'm trying to run a Maven WebApp with Jetty by command line. I'm on a RedHat box I run this command: mvn clean install -P deployJetty -Djetty.port=8083 And I get this error: Listening for…
migo
  • 233
  • 1
  • 2
  • 8
20
votes
11 answers

What's a good Java-based Master-Slave communication mechanism?

I'm creating a Java application that requires master-slave communication between JVMs, possibly residing on the same physical machine. There will be a "master" server running inside a Java EE application server (i.e. JBoss) that will have "slave"…
Phuong LeCong
  • 1,834
  • 16
  • 19
19
votes
3 answers

RMI vs REST Service

We are developing a service for our portal / web client developed using JSF . My advice was to expose the service as REST but another team member said to go with RMI implementation since its easier to deal in java object from development and testing…
Farm
  • 3,356
  • 2
  • 31
  • 32
19
votes
4 answers

RMI and exceptions

I am new to using RMI and I am relatively new to using exceptions. I want to be able to throw an exception over RMI (is this possible?) I have a simple server which serves up students and I have delete method which if the student doesn't exist I…
Malachi
  • 33,142
  • 18
  • 63
  • 96
19
votes
3 answers

Java RMI AccessControlException: access denied

Hey I'm getting a AccessControlException: access denied when attempting to start up a RMI app I'm writing, I can't work out why I get this exception if I open it on the default port 1099, or on another dynamic port, my policy file currently grants…
Gwilym
  • 775
  • 2
  • 9
  • 19
19
votes
4 answers

Java RMI - UnicastRemoteObject: what is the difference between UnicastRemoteObject.exportObject() and extends UnicastRemoteObject?

i'm preparing for an exam and I'm having a question that I hope someone here could answer me. It's about RMI and remote objects. I wonder why there is so much difference between these two implementations. one is extending the UnicastRemoteObject…
CatholicEvangelist
  • 355
  • 2
  • 4
  • 11
17
votes
2 answers

What is the difference between java.rmi.Naming and java.rmi.registry.LocateRegistry

when studying RMI sometimes (head first Java) dudes use Naming.rebind(name, object) but other peoples on the web (oracle) use Registry registry = LocateRegistry.getRegistry(); registry.rebind(name, object); I know that hf java is a little…
demonz demonz
  • 641
  • 1
  • 15
  • 32
17
votes
3 answers

rmi vs servlets vs sockets

what is the difference between socket programming, rmi and Servlets. When to use what?
kc3
  • 4,281
  • 7
  • 20
  • 16
17
votes
5 answers

NullPointerException in invokeLater while running through Java Webstart

After upgraded from JRE 1.7.0_21 to 1.7.0_25-b15 my application started to throw NullPointerException in SwingUtilities.invokeLater(...) when it is run from Java WebStart. Surprisingly when it is executed as a standalone application (outside JWS),…
digital_infinity
  • 534
  • 6
  • 20