users@jax-rpc.java.net

Re: portable stubs

From: Sang Shin <Sang.Shin_at_Sun.COM>
Date: Sun, 07 Apr 2002 22:10:44 -0400

Sam wrote:
>
> I dont think thats correct (about stubs getting generated by the
> client).

Sam,

(I am not working in JAX-RPC group. So these are my
personal interpretation of the spec.)

Just for the record, I did not say tht stub gets generated
by
the "client". :-) I said that stub gets generated by the
"client side JAX-RPC runtime system" (or by deployment
tool for that runtime system) at the time of deployment.

>
> JAX-RPC defines an API for client-side stubs via the javax.rpc.Stub
> interface.... however I fail to see how that makes the stubs portable
> and independent of the Tie implementation ?

Also I did not say that the stub is portable. Actually what
I said
is the opposite, that is stub is not in fact portable. And
the
reason it is not portable is because stub might contain
client side JAX-RPC runtime specific code as you correctly
suspect. However, I heard that this could change in
the future version of JAX-RPC.

-Sang

>
> What happens if the client is deployed in another JAXRPC runtime
> (and not the RI) ?? I mean I could write a class that implements
> the Stub interface and its 3 simple methods but how does that hook
> it up to my corresponding tie (which may be generated by a completely
> different runtime ?)....
>
> Can anyone clarify this ? Am I missing something ?
>
> /sam
>
> Sang Shin wrote:
> >
> > Sang Shin wrote:
> > >
> > > Sam wrote:
> > > >
> > > > I m not sure about this. Perhaps you can clarify this.
> > > >
> > > > What is the bigger picture.. of how clients use stubs ?
> > > >
> > > > The way I see it a stub can be distributed with a client and the client
> > > > can access the stub (as we do in RMI clients by doing something similar
> > > > to a lookup).
> > >
> > > According to the JAX-RPC spec, the stub gets generated
> > > during
> > > deployment time specific to a particular JAX-RPC runtime
> > > system. (One of the reasonings for this is not to
> > > impose the portability requirement to the stub.)
> > >
> > > Even in regular RMI, the recommended practice is to download
> > > the stub during runtime through something like RMI registry
> > > (or Jini lookup service) during runtime. So distributing
> > > a stub with a client is usually considered a bad practice.
> > >
> >
> > (I am not working in JAX-RPC group. So these are my
> > personal interpretation of the spec.)
> >
> > By the way, I did not mean to imply that in the case of
> > JAX-RPC,
> > the stub gets downloaded to the client during runtime. My
> > understanding is that the stub gets generated by the client
> > side JAX-RPC runtime system.
> >
> > ---------------------------------------------
> > Sang Shin sang.shin_at_sun.com
> > Strategic Market Development (781) 442-0531(Work)
> > Sun Microsystems, Inc. (781) 993-1136(Fax)
> >
> > http://www.plurb.com/misc/xml/brandeis-xml-2001.html#bio
> > http://www.plurb.com/misc/te/SangSchedule.html
> > ---------------------------------------------
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com

--
---------------------------------------------
Sang Shin                       sang.shin_at_sun.com
Strategic Market Development    (781) 442-0531(Work)
Sun Microsystems, Inc.          (781) 993-1136(Fax)
http://www.plurb.com/misc/xml/brandeis-xml-2001.html#bio
http://www.plurb.com/misc/te/SangSchedule.html
---------------------------------------------