Re: How to Get the ObjectID?

Peter Jones <[email protected]> Wed, 27 May 2009 16:42:54 -0400
Newsgroups gmane.comp.java.sun.rmi
Message-ID <20090527204254.GB3135@east>
On Mon, May 25, 2009 at 07:11:18AM -0600, Alex Co wrote:
> Focusing on the ObjectID for now:
> well, that ObjectID is the ID of the object that implements the remote method, 
> right. Tipically it is the ID that is stored on the skeleton object (server side 
> oject), right. But I have no skeletton class, just the stub.
> 
> Please, any easy way to get this Object ID?

The stub contains the ObjID too, which is how the client side knows
what ObjID value to send.  Similar to what I described for the port
number here:

    http://archives.java.sun.com/cgi-bin/wa?A2=ind0904&L=RMI-USERS&P=381

the ObjID of a stub can be retrieved non-portably from its toString()
result, or it can be retrieved portably from its serialized form.

-- Peter

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff RMI-USERS".  For general help, send email to
[email protected] and include in the body of the message "help".

For a list of frequently asked RMI questions please refer to:
http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html

To view past RMI-USERS postings, please see:
http://archives.java.sun.com/archives/rmi-users.html