Aaron Stromas wrote:
> when i read your comment i decided to step back and review my
> understanding of rmi. in
> http://java.sun.com/products/jdk/1.2/docs/guide/rmi/codebase.html it
> states
>
>
> 3. The RMI registry returns a reference (the stub instance)
> to the requested class. If the class
> definition for the stub instance can be found locally
> in the client's CLASSPATH , which is always
> searched before the codebase, the client will load the
> class locally. However, if the definition for
> the stub is not found in the client's CLASSPATH, the
> client will attempt to retrieve the class
> definition from the remote object's codebase.
>
> my reading of the above document suggests that the rmiregistry indeed
> sends the stub to the client. am i wrong?
What I meant by "RMI doesn't send classfiles" is that the interface
through which you get your RMI stub handle does not also return
classfiles. But if you set things up properly on the server side, that
interface can advertise a location (codebase) where the client can find
classfiles. This proper setup, described in the document you referenced,
includes:
1) Making the codebase available through some networked service (ftp or
http), and
2) Setting a property (java.rmi.server.codebase) in the RMI server that
points to the networked location of that codebase.
Nathan
>
>
>
> Nathan Meyers wrote:
>
> > On Tue, Jan 11, 2000 at 01:15:17PM -0500, Aaron Stromas wrote:
> > > it also worked on linux when i copied the _Stub class to the
> > client. so,
> > > why doesn't the server find the stub to return to the client?
> >
> > Ah, the real meat of the question. Answer: because RMI doesn't work
> > that
> > way.
> >
> > RMI doesn't send classfiles, either for the real class or the stub.
> > The client has to be able to find the stub in its own classpath.
> > RMI just sends data that is used with the stub class.
>
> nathan,
>
> when i read your comment i decided to step back and review my
> understanding of rmi. in
> http://java.sun.com/products/jdk/1.2/docs/guide/rmi/codebase.html it
> states
>
>
> 3. The RMI registry returns a reference (the stub instance)
> to the requested class. If the class
> definition for the stub instance can be found locally
> in the client's CLASSPATH , which is always
> searched before the codebase, the client will load the
> class locally. However, if the definition for
> the stub is not found in the client's CLASSPATH, the
> client will attempt to retrieve the class
> definition from the remote object's codebase.
>
> further down it says:
>
> 5.The class definition for the stub (and any other class(es)
> that it needs) is downloaded to the client.
>
> my reading of the above document suggests that the rmiregistry indeed
> sends the stub to the client. am i wrong?
>
>
> >
> >
> > Nathan Meyers
> > [EMAIL PROTECTED]
> >
> > > > Aaron Stromas wrote:
> > > >
> > > > > [EMAIL PROTECTED] wrote:
> > > > >
> > > > > > On Tue, Jan 11, 2000 at 02:00:00PM +0000, Aaron M. Stromas
> > wrote:
> > > > > > > greetings,
> > > > > > >
> > > > > > > may someone have a hint as to what my problem may be and
> > how to fix it.
> > > > > > > here is what is happening. i have a an rmi application
> > with linux
> > > > > > > client (jdk 1.2) and solaris server (jdk 1.3). the client
> > throws an
> > > > > > > UnmarshalException. i could not figure out why it wa
> > happening, so i
> > > > > > > tried the rmi example from the "professional java server
> > programming"
> > > > > > > which also throws the unmarshal exception. the client ran
> > fine on the
> > > > > > > same solaris box where the server ran, so i tried the
> > client from
> > > > > > > another solaris host, also running jdk 1.3 - runs fine.
> > > > > >
> > > > > > Don't the two vm's have to be the same, as the serial
> > numbers will be
> > > > > > different between 1.2 and 1.3, which will cause
> > Serialization errors?
> > > > > >
> > > > >
> > > > > i did not know that. is that a fact? if so, i have a serious
> > problem :-(
> > > >
> > > > that does not appear to be so, at least, not on solaris - i
> > installed
> > > > jdk1.2.1_04 and the client ran ok.
> > > >
> > >
> > > it also worked on linux when i copied the _Stub class to the
> > client. so,
> > > why doesn't the server find the stub to return to the client?
> > > --
> > > Aaron Stromas
> > > Oracle Corp.
> > >
> > > "Tick-tick-tick!!!... ja, Pantani is weg...."
> > > (BRTN commentator, L'Alpe d'Huez, 1995 Tour de
> > France)
> > >
> > >
> >
> > Content-Description: Card for Aaron Stromas
> >
> > -------------------------------------------
> > --------------------------
> > To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
> --
> Aaron Stromas
> Oracle Corp.
>
> "Tick-tick-tick!!!... ja, Pantani is weg...."
> (BRTN commentator, L'Alpe d'Huez, 1995 Tour de
> France)
>
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]