This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI Quiz.  RSS feed

 
Eager Beaver
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Which of the following would not locate the remote "obj1" service on machine www.jguru.com (IP address is 216.217.9.172), where the standard RMI registry was used?
A. Naming.lookup("rmi://www.jguru.com/obj1");
B. Naming.lookup("rmi://216.217.9.172/obj1");
C. Naming.lookup("rmi://www.jguru.com:1199/obj1") ;
D. Naming.lookup("www.jguru.com:1099/obj1");
Please elaborate on your choice.
Thanks & regards.

 
hanumanth reddy
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I Option D does not locate the object Bcoz Rmi Use Rmi Protocol to Locate the Object
 
Eager Beaver
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hanumantha,
Even I guessed the same but the correct answer displayed at the end of the Quiz was 'C'. I still fail to understand how.
eager.
 
Ashwin Desai
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
rmi:// is not a mandatory prefix. It could also be http://

If you read the last part of the question, it refers to "standard rmi registry". This runs on port 1099 (default that need not be specified). Thus, C is the answer as it tries to lookup a service on a different port number.
Ashwin.

[This message has been edited by Ashwin Desai (edited March 07, 2001).]
 
Eager Beaver
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ashwin,
Thanks for contributing, however I would like to know if 'D' is syntactically correct as it has neither rmi:// nor http://. Also how is 'standard rmi registry' diff from any other rmi registry.
Thanks in anticpation of your reply.
eager.
 
Ashwin Desai
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
standard RMI registry is the "RMI registry started with no port number argument or argument = 1099" i.e. typing rmiregistry at the prompt which starts the rmi registry that listens at 1099.
Also, D is syntactically correct as rmi:// is not required. a www. would be perfectly OK (as this translates to http://www.)
Ashwin.

[This message has been edited by Ashwin Desai (edited March 08, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!