RMI Question

C

Curt Tabor

I'm a java newbie and I have a question about RMI on Windows.

In COM on Windows, you can create an out of process server that exists
in it's own process and you can call methods on it. Does RMI work this
way? Can I instantiate remote objects of the same class and have each
instance reside in it's own process space?

Thanks,

Curt
 
M

Matt Humphrey

Curt Tabor said:
I'm a java newbie and I have a question about RMI on Windows.

In COM on Windows, you can create an out of process server that exists
in it's own process and you can call methods on it. Does RMI work this
way? Can I instantiate remote objects of the same class and have each
instance reside in it's own process space?

Using RMI you can instantiate remote objects and interact with them
independently to each other or to the services provided by you published or
main services. It's kind of like each remote object is its own server.
They all reside in the remote JVM that hosts them, so to the extent they
come from the same JVM they are in the same process space. However, your
client can connect to any number of objects from any locations (including
itself) without being concerned where the actual server is so there is no
need for the objects to be in the same JVM--you can distribute them as you
like. What are you trying to accomplish by having each object in a separate
process space?

Cheers,
Matt Humphrey (e-mail address removed) http://www.iviz.com/
 
C

Curt Tabor

Thanks! That clears things up and confirms what I thought. I am writing
a vehicle diagnostic system that uses Win32 DLLs to run concurrent
tests and these DLLs must reside in different process spaces or they
cannot be used concurrently. Since the project requires Win32, it looks
like COM out-of-proc servers is the way to go.

Curt
 
D

dimitar

Fowr what it's worth, you can get out-of-process remote objects by using
RMI Activation. What you need to do is to register each instance in its
own ActivationGroup.

Dimitar
 

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

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top