Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI proxy

 
Harshana Dias
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

Its been said in HFSJ that when we are using RMI, youll create a proxy and you register your object some sort of a registry. Any client who wants to call your methods will do a look up on the registry and get a copy of the remote proxy.

What is meant by create a proxy here? i mean what is a proxy?

Thank You.
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The methods on either end of the Remote Method Invocation must implement the same interface.
So, your local code calls a method on an object without knowing of it's remote implementation.

Since the local class only represents the actual implementing class on the other JVM, it is called a Proxy.
 
Harshana Dias
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Sebastian. can you tell me what is meaning by Stub and the different between proxy and a stub ?
 
Chinmaya Chowdary
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Harshana. Stub acts as proxy for client side. Skelton acts as proxy for server side.
 
Harshana Dias
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Harshana Dias wrote:Hey,

Its been said in HFSJ that when we are using RMI, youll create a proxy and you register your object some sort of a registry. Any client who wants to call your methods will do a look up on the registry and get a copy of the remote proxy.



I have more doubts and also the lack of industry experience of mine really matters this last chapter i guess

1. what is the real reason we run MVC components in different servers..i guess all model classes reside in one server and jsp's reside in one server and servelts in other?

2."you register your object some sort of a registry"
what is the registry really means? and who do those things? container or who? is it the interface which Sabastian talking about?

3. why is the need of a Skelton..i mean all we want is a client proxy of the real remote object know(which is Stub)..so why we need a proxy on the server as Skelton..cant the Stub directly communicate with the real remote object?

4.we know first we have to register our model object reside in the model server right? may be by declaring the path..for that we are using JNDI know? but in HFJS it says you can use a well know registers such as JNDI or RMI for this purpose. is RMI a registry service?


Thankx in advance.







 
Harshana Dias
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic