×

Loading...

Some examples may help

本文发表在 rolia.net 枫下论坛If you have time, you may go to java.sun.com and download a few RMI examples from free Java tutorials and deploy them on your computer.

A still better example is in Jason Hunter's book titled "Servlet Programming". It is
a "chatroom". The chat server is a servlet and the client is an applet. They can commuincate using http, rmi and raw socket connection. You can download the code
from www.servlets.com. If you have hands-on servlet and applet experiences, you might be able to deploy the servlet in Tomcat or Java Web Server, and download the applet to
IE or Netscape.

To make this example work, you need first
correct the deprecated API in the code. Next,
you willl see the applet does not work in IE.
The reason is IE does not support RMI because its poor Java Virtual machine.
(This is a very useful tip for Java guys!)
So you need download Java Plugin and install it.

Here is a tip. If anybody id devoted to Java, he should try to run various demo or examples
frequently. Our direct experiences are very limited. Our time is limited. Running examples or demos can help us cover our tails.

By the way, I don't think it is a good idea to
say "I had ever developed project with EJB so I can start to write codes with RMI in half a hour". Such a reasoning is too narrow.
Employers always believe your past experiences. IT industry is full of hypes and prejudices. For instance, employers often
require that a programmer have a MS in
computer science or mathematics. The reason is that they believe mathematicians
are good at computing. But I have ever taught one MS in CS and one MS in mathematics and observed that they have
no sense in coding at all.

Since we are discussing RMI, I would like to
ask the following two questions:
1) Is there any big architectural difference in
the Java 2 version of RMI and its JDK 1.1 version?
2) What's relationship between RMI and JNDI?
3) What kind of methods does Remote Interface introduce?
Probably, few people will ask you these questions. However, if you can answer these questions, it implies you have known a lot about RMI so you can talk big in the interview.

I think you can claim you have ever used
RMI in servlet-applet programming. However, don't say you have ever written a
chat room. Chat Room can itself be a project.

Hope it helps更多精彩文章及讨论,请光临枫下论坛 rolia.net
Sign in and Reply Report