aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes RMI codebase Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "RMI codebase" Watch "RMI codebase" New topic
Author

RMI codebase

Mandy Yan
Ranch Hand

Joined: Jun 22, 2002
Posts: 36
I met problems related to RMI.
I have prepared 2 jars, client.jar and server.jar which are the classes required to start client and server respectively.
Is that _Skel.class should only be included in client.jar while _Stub.class should only be included in server.jar? However, I found that I cannot run the client without _Stub.class in the client.jar.
I have tried to start a HTTP server and set the codebase to the HTTP directory containing the Stub when I start the server program. However, the client throws the following exception:
RemoteException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: suncertify.server.DatabaseServer_Stub
(no security manager: RMI class loader disabled)
Can anyone kindly give me some idea on my problem?
Thank you very much!
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937
The consensus in this group has been that you don't need to implement dynamic downloading, codebase, HTTP servers, security managers, or policy files for this assignment. Just package your stubs with the client, that's it.
Eugene.
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
You don't need to generate _skel classes starting jsdk1.2. Like Eugene mentioned, you don't have to use codebase, RMI security manager or java.policy file for this assignment. If you like to use codebse, you have to go with only file URL and not HTTP server. Since you are supposed to develop a system which works across all the platforms, you have to write code to get the current directory and set the System property in side your code.
In my submission, I bundled _Stub files with the client.jar.
Mandy Yan
Ranch Hand

Joined: Jun 22, 2002
Posts: 36
Thank you very much!
MJ Tang
Greenhorn

Joined: Jun 13, 2002
Posts: 5
Hi,
I am at the point of implementing RMI too.
I will follow your point not to generate _skel classes, and not to have codebase, RMI security manager or java.policy file.
But what means that we have to write code to get the current directory and set the System property in side our code?
Appreciated if anybody could explain more.
Linda
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

"lindamjt "-
Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy.
You can change it
here.
Thanks! and welcome to the JavaRanch!
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

But what means that we have to write code to get the current directory and set the System property in side our code?

I don't know about setting any System properties. However you will need to get the current directory via
System.getProperty("user.dir");
Mark
MJ Tang
Greenhorn

Joined: Jun 13, 2002
Posts: 5
Hi, Mark
I got it. Thanks.
Linda
ravindra janapreddy
Ranch Hand

Joined: Jan 30, 2001
Posts: 84
You don't need to generate _skel classes starting jsdk1.2.
When I used rmic compiler to compile the server implementation we get both skelton as well as stub class.
Please point me to the location where I could refer to RMI with reference to jsdk1.2 .
Thanks
Ravi


SCEA, SCBCD, SCWCD, SCJD, SCJP
ravindra janapreddy
Ranch Hand

Joined: Jan 30, 2001
Posts: 84
I have referred to tutorial on RMI on sun site.
In the Java 2 SDK implementation of RMI, the new wire protocol has made skeleton classes obsolete.
After you run rmic you should find the file Calculator_Stub.class and, if you are running the Java 2 SDK, Calculator_Skel.class.
My question is if we don't skelton class on server side i.e server side proxy how does the server handle the client request ? Would it be sufficient for me to just copy the stub class to the client side and let the client make the request to server through the stub? The server object shall inherently handle the incoming request itself.
Thanks
Ravindra
 
jQuery in Action, 2nd edition
 
subject: RMI codebase