Re: How to Get the ObjectID?

Alex Co <[email protected]> Tue, 26 May 2009 02:49:23 -0600
Newsgroups gmane.comp.java.sun.rmi
Message-ID <LISTSERV%[email protected]>
..m=20=20=20=20=20=20=20


8# (Send)
00000000  51 AC ED 00 05 77 0F 01 9D E2 22 A5 00 00 01 21    Q....w....".=
...!
00000010  77 ED CA 46 80 29                                  w..F.)=20=20=
=20=20=20=20=20=20=20=20


On message 1# (received at RMI server) we can see that client is starting=
 up=20
the handshake for the stream protocol.

On message 2# the RMI server responds telling RMI client that it supports=
 the=20
stream protocol but it also sends to the client the client=92s endpoint.

On message 3#, the RMI client responds to the RMI server with its fake=20=

listening endpoint (just to respect the protocol). But in this message cl=
ient=20
sends more information that I can=92t understand why nor for what aim eit=
her.

Message 4# seems to be a response from the RMI server to the client=92s=20=

strange message (strange at least for me).=20

Messages 5 and 6: I don=92t understand them.

Message 7# is a call method request from the RMI client for a specific me=
thod

Message 8# is the response to the call message. 0x51 means ok.

So, if RMI server shows this:

HelloWorldServer[UnicastServerRef [liveRef:=20
[endpoint:[192.168.1.2:27000](local)
,objID:[-621ddd5b:12177edca46:-7fff, -6483729047876005357]]]]

Why message 7# sends an object id that is different from the one showed b=
y=20
the server?

According to the JDK source code, na ObjID is sent by the wire in this fo=
rmat:

         out.writeLong(l); //ObjNum (last field of the RMI server output)=

         out.writeInt();   //First field of the RMI server output (UID:1)=

         out.writeLong();  //Second field of the RMI server output (UID:2=
)
         out.writeShort(); //Third field of the RMI server output (UID:3)=

         out.writeInt();   //Method number
         out.writeLong(l); //method hash

Please, could you help me understand these messages and ObjectID sent by=20=

the client (which is different from the server objID)

Many thanks

Alex

=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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