Project RMI Communication Test --- 1.0
Subproject of Mobile Datacommunication
Goals
"Mobile Datacommunication" is a chapter in the book called "Java praxisnah - Profitieren Sie von Programmierprofis".
RMI Communication Test is a source code package used in the book. RMI Communication Test shows how to set up an
error respecting RMI communication on a low-quality, high-latency bearer (e.g. GPRS connection).
Installation
Major software products involved:
- JDK version 1.4.x
- Ant version 1.5.1
It is assumed that JDK and Ant software are already installed and ready
to run on your system.
Compile
- First of all open the ant build file "build.xml" and look for
the line
<property name="root"
value="e:/.../sources/rmitest/" />
Edit the value to point exactly to the project root directory and save
the file.
[Note: This step is necessary to launch the server process using the ant
scripts.]
- Type "ant" into your command line
tool. The default target for ant is the "deploy" target. This will
compile all necessary sources and execute the rmic compiler to build the
stubs and skeletons necessary for RMI communication.
- Compilation should succeed without any problems.
- If you encounter problems regarding ant or java please check your
installation of ant and / or the java jdk.
Execution
- To execute the example you have to open three different
command line environments.
One will be used to execute the RMI registry.
One will be used to execute the RMI server.
The third will be used to execute the RMI client.
- Change to the first command line and type
rmiregistry
- Switch to the second command line and type
ant run.server
- Switch to the last command line and type
ant run.client
The client will invoke the server method String
echo(String input) for exactly 1000 times.
Disclaimer
All code provided is provided on an "AS IS" basis, without warranty. The author
makes no representation, or warranty, either express or implied,
with respect to the programs, their quality, accuracy, or fitness for a specific purpose.
Therefore, the author will not have any liability to you or any other person or entity with respect to any liability,
loss, or damage caused or alleged to have been caused directly or indirectly by the programs provided by the author.
This includes, but is not limited to, interruption of service, loss of data, loss of profits, or consequential damages
from the use of these programs.
Terms of Use
All code provided by the author for view and/or download is the copyrighted work of the respective author.