aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes What does the stub and skeleton exactly contain? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "What does the stub and skeleton exactly contain?" Watch "What does the stub and skeleton exactly contain?" New topic
Author

What does the stub and skeleton exactly contain?

Manas Ahlaad
Ranch Hand

Joined: Nov 07, 2001
Posts: 165
What does the stub and skeleton exactly contain?


Manas<br />Today If You are not Confused,You are just not thinking Clearly !<br />---------------------------------
Leena Diwan
Ranch Hand

Joined: Jun 18, 2001
Posts: 351
Hi !!
Stubs and skeletons contain the method signatures of the remote objects.
Anyone would like to comment ?
Regards..
Leena


[SCJP2, SCWCD1.3, SCBCD]
raj sb
Greenhorn

Joined: Dec 02, 2001
Posts: 6
Hi all,
Stub objects are surrogates that support exactly the same set of remote interfaces defined by the actual implementation of a remote object.
A skeleton is a server-side entity that dispatches calls to the actual remote object implementation. The dispatch logic is to unmarshals any arguments from the input stream obtained from the call object, invokes the method (indicated by the operation number opnum) on the actual remote object implementation obj, and marshals the return value or throws an exception if one occurs during the invocation.
Correct me if i m wrong and any add-on information will be appreciated.
Cheers.
Prabhakar Goel
Greenhorn

Joined: Nov 21, 2001
Posts: 5
Stubs and Skeleton were introduced with the RMI to remove the Remote Invocation Logic that were earlier made by RPC etc. It actually encapsulates the Serialization and Deserialization Logic between the client and Server talks.
It provides location transparency to remote object invocation, and other network specific issues like marshalling and demarshalling of objects is done in a simpler way of serialization and deserialization of java objects and transferring the objects from one JVM to the other remote JVM.
Hope it helps ............
------------------
enJoy Life with Technology ;-)


pirbhu<BR>***********************************<BR>enJoy Life with Technology<BR>***********************************
nand keswani
Greenhorn

Joined: Dec 04, 2001
Posts: 12
Hi All,
This does'nt contain Method Signatures. IT contain logic about packaging the arguments list , depackaging , location transparency,Marshalling ....
bye

Originally posted by Leena Diwan:
Hi !!
Stubs and skeletons contain the method signatures of the remote objects.
Anyone would like to comment ?
Regards..
Leena

chanoch wiggers
Author
Ranch Hand

Joined: May 24, 2001
Posts: 245
Here is an example of a stub:
import java.rmi.server.*;
import java.lang.reflect.Method;
import java.rmi.RemoteException;
import java.rmi.UnexpectedException;
public final synchronized class CallbackApplet_Stub
extends RemoteStub implements ClientInterface {
private static final long serialVersionUID = 2;
private static Method $method_popup_0;
static Class class$ClientInterface;
static Class class$java$lang$String;
static {
try {
$method_popup_0 = ((class$ClientInterface != null) ?
class$ClientInterface :
(class$ClientInterface = class$("ClientInterface"))).getMethod("popup", { (class$java$lang$String != null) ? class$java$lang$String : (class$java$lang$String = class$("java.lang.String")) });
} catch (NoSuchMethodException e) {
throw new NoSuchMethodError("stub class initialization failed");
}
}
public CallbackApplet_Stub(RemoteRef remoteRef) {
super(remoteRef);
}
static Class class$(String string) {
try {
return Class.forName(string);
} catch (ClassNotFoundException e) {
throw new NoClassDefFoundError(e.getMessage());
}
}
public void popup(String string)
throws RemoteException {
try {
Object object;
ref.invoke(this, $method_popup_0, { string }, -6724103847495166028);
} catch () {
throw object;
} catch () {
throw object;
} catch () {
throw new UnexpectedException("undeclared checked exception", object);
}
}
}

chanoch<p><a href="http://www.amazon.com/exec/obidos/ASIN/1861007736/" target="_blank" rel="nofollow">Author of Professional Apache Tomcat</a></p>
Manas Ahlaad
Ranch Hand

Joined: Nov 07, 2001
Posts: 165

thanks all for your valuable replies and views
these let me to get good idea about stubs ,skeletons
regards
laxman
shailesh sonavadekar
Ranch Hand

Joined: Oct 12, 2000
Posts: 1874
Manas , you will get more idea about the STUB & SKELETON in rmi / corba forum.
Briefly , you can say that it is java extention of RPC ( Remote Procedure Call ) . Offcourse for distributed systems.
Jim Bertorelli
Ranch Hand

Joined: Nov 28, 2001
Posts: 136
They are plain java files. Just open them and see what they do
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What does the stub and skeleton exactly contain?
 
Similar Threads
Does the EJBObject act as a skeleton?
Skeleton in Java2
RMI
Stub and skeleton?
RMIC