简体   繁体   中英

What's the main purpose of using java rmi activation system?

First of all, I am reading the java official document about rmi specification. http://docs.oracle.com/javase/7/docs/technotes/guides/rmi/index.html http://docs.oracle.com/javase/7/docs/platform/rmi/spec/rmi-activation2.html

The features in java rmi listed in oracle website can be easily understood except rmi activation part. I have read through the detailed document of rmi activation mechanism, but still got nothing about the useful practice in the real scenario.

Thus, these are several question which really confused me as follows:

  1. Regarding the doc, rmid is a router which specifies the remote rmi server and return the server information to the clients only once. This looks like the similar function with rmiregistry which is a place for the server to register services. What's the difference if we do not have it?
  2. Does this mechanism include server auto-recovery or failover functionality? In other words, I have already known that remote rmi server should be registered on RMID, if one of remote rmi server (maybe on different machine) crashed, can RMID detect this and trigger this remote rmi server bouncing?
  3. Can the function of rmid be implemented via using the rmi API in order to run the same function in my customized standalone server instead of using JDK RMID tools. For example, tools rmiregistry could be replaced with rmi API LocateRegistry.createRegistry(regPort);

Please advise or provide the relevant material, thanks in advance.

Regarding the doc, rmid is a router which specifies the remote rmi server and return the server information to the clients only once.

No. The documentation doesn't say that. 'rmid' is a daemon that starts the remote object if it isn't already running.

This looks like the similar function with rmiregistry

No.

Does this mechanism include server auto-recovery or failover functionality?

If the JVM containing an activated remote object exits, or the activated remote object de-activates itself, rmid will restart it on demand.

Can rmid be running in the standalone server, and initialize via java API instead of rmi tools?

I don't understand the question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM