newInstance and rmi

G

Glenn Robinson

Hello,

I have some code which executes a class on a remote system using rmi, this
works fine.

I now need to be able to expand my code so that, at runtime, I can determine
the name of the remote class I need to run.

If I use

1. dmClass = Class.forName(dmClassName);
2. DataManager dm = (DataManager) dmClass.newInstance();

I will get a new instance of the class specified by the dmClassName
variable.

How can I combine the above to the find the instance of the remote class?

I'm using:

3. RmtServer server = (RmtServer) Naming.lookup(rmtURI);

How do I create a reference between the dmClass object and the server
object?
 

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,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top