• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI proxy

 
Ranch Hand
Posts: 352
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 352
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?
 
Ranch Hand
Posts: 437
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 352
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 352
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
My, my, aren't you a big fella. Here, have a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic