Meaningless Drivel is fun!*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes SCJD RMI Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "SCJD RMI Query" Watch "SCJD RMI Query" New topic
Author

SCJD RMI Query

Marcelo Ortega
Ranch Hand

Joined: May 31, 2005
Posts: 519

A client gets a reference (a handle) to a remote object via the method Name.lookup().
But how can that remote object (server) obtain a reference to the client which invoked one of its methods?

Best regards,
Marzo.


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD, SCEA/OCMJEA

Live life to an interface, not an implementation!
David George
Greenhorn

Joined: Aug 23, 2005
Posts: 10
I think can not.The server can not invoke the client's method - on my opinion.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404
    
  81

Hi Marzo,

What are you trying to achieve here?

You can find out the IP address of the client, however if there is more than one client at that particular address then the information cannot be used to uniquely identify the client.

You can create your own unique identifiers for each client (that wont mean anything to the client - they will just mean something to you).

You can also have the clients register themselves as observers of your server, in which case you could have the server call client methods.

But these are all very different issues, so more information on what you are trying to achieve is needed .

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SCJD RMI Query
 
Similar Threads
How server deal with a remote object when a client dead?
Mock question from Headfirst EJB
RMI question
A question on Value object or data transfer object
classCastException