How to Debug RMI server ?

L

Laufrech

Hello,
I'm curently working with Eclipse on Windows XP.
A "software genius" is creating an architecture based on RMI servers. Even if
all the services are to be on the same computer. Do not ask me why: I am a
victim, not the criminal ;-)
I'll have to develop several RMI servers then.
Ok.
The point is: how is it possible to debug RMI servers ?

My RMI clients and servers are on the same computer. It's easy for the client's
side, but about the server, I haven't got a clue !

If someone has an idea, methods, or anything, please do not hesitate !!!

Thanks in advance.
L.A
 
A

Alexandr Molochnikov

First of all, your server will have to be launched with the following
run-time parameters passed to Java VM:

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspen
d=n

Here 8000 is the port number that the VM will listen on for debugging. You
can choose a different port.

Then, with the server running, click on "Debug" button in the Eclipse
toolbar, this displays the Debug dialog. Select "Remote Java Application"
and press the "New" button. Fill in the Project field, set host to
"localhost", and port to 8000 (or whatever you used in the "address"
parameter above). Click on the "Source" tab and set the source lookup path
to include the source code directories of your server (you will need it if
you put breakpoints in the code and want to walk through the code, executing
statements one by one, or check the state of the variables etc.)

Finally, press the "Debug" button at the bottom of the Debug dialog, and
Eclipse debugger will connect to the running Java VM. At this point, you are
in business.

If you run multiple servers on the same host, you will have to choose a
different port number for each server.

HTH

Alex Molochnikov
Gestalt Corporation
www.gestalt.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top