The Artima Developer Community
Sponsored Link

Jini Forum
Running Jini1.2 how t get rid of the stubs??????????

3 replies on 1 page. Most recent reply: May 1, 2002 7:12 PM by jason

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
megha

Posts: 2
Nickname: megha
Registered: Feb, 2002

Running Jini1.2 how t get rid of the stubs?????????? Posted: Feb 25, 2002 1:29 AM
Reply to this message Reply
Advertisement
Hi i am runnign Jini1.2, and yet I have to keep stubs at the codebase for the client to access my server
interface..

as far as I know.. Jini1.2 doesnt need stubs.. pls help me get rid of this problem..


Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Re: Running Jini1.2 how t get rid of the stubs?????????? Posted: Feb 25, 2002 4:53 PM
Reply to this message Reply
Jini, per se, doesn't need stubs. Stubs are something you need for remote method invocation. Not only RMI, but many other RPC technologies also rely on the use of stubs. In essence, a "stub" is a little piece of code that "stands in" the place of a remote object and, typically, simply forwards method invocations to, and return values from, the remote object.

There are RPC mechanisms not dependent on stubs -- for instance, you can use IP multicast messages, etc, Jini allows any of these RPC mechanisms to be used. Jini even allows you to use no RPC mechanism at all, and to use instead straight TCP sockets, HTTP, or even implement a service so that it doesn't make any network connections from the client.
That said, whatever piece of code represents the service on the client side, that code must be available at the client, i.e., that code somehow must moves to the client. Jini specifies that "RMI semantics" be used for mobile code. In the simplest terms, that means that when you ship an object, you annotate a codebase URL to the serialized form of that object. If you use straight Java object serialization (you can use any mechanism to do that, btw), serialization "marshalls" the object's instance representation to an output stream, and then marks the classes those objects belong to with something called a ClassInfo. If the client doesn't have the class represented by these ClassInfo markers, it must download it from somewhere on the network, and that's when the "RMI semantics" of code mobility come into play.

So, if you write the URL(s) where a client can download the classes from at the end of the marshalled stream, the client can create class loaders corresponding to those URLs, and load the classes from there. The client's programmer doesn't have to be aware of those chunks going down the wire (but he does need allow code to come into the client from the network, and hence install an RMISecurityManager).

In summary, stubs are for remote procedure calls, not for Jini. Now, the current implementation of the Jini specs by Sun actually uses RMI underneath, so it does rely on remote stubs (but that's mostly hidden from you). It's mobile code that requires that a client somehow can download code from the network -- whether that code is needed for deserializing stub objects or any other type of object the server provices.

Hope this helps.

Frank

bob bee

Posts: 1
Nickname: bob1414
Registered: Apr, 2002

Re: Running Jini1.2 how t get rid of the stubs?????????? Posted: Apr 30, 2002 7:27 PM
Reply to this message Reply
go to: http://www.geocities.com/filthy_jerboa/ridad.txt

to see the script to get rid of the advertisement on geocities.com member services

jason

Posts: 2
Nickname: jas
Registered: May, 2002

Re: Running Jini1.2 how t get rid of the stubs?????????? Posted: May 1, 2002 7:12 PM
Reply to this message Reply
hi!
can u please tell me how to get the source code for the book titled javaspaces example by example by steven L Halter, there is no accompanying CD with book and i couldnt find in www.phptr.com/ informit.com.
thanks a lot
jason

Flat View: This topic has 3 replies on 1 page
Topic: Db2 driver not going to jini client Previous Topic   Next Topic Topic: please need help on multiple clients

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use