RMI Connection questions... (Newbie)

  • Thread starter Agustin Chernitsky
  • Start date
A

Agustin Chernitsky

Hi Guys,

I'm starting with RMI (I actually started programming in Java a month ago)
and I have some questions/doubts:

1.- Why I don't get any persistent connections? All connections initiated
from Clients to Server are in a status of TIME_WAIT as soon as there is no
more interactivity (Remote method invocations) between them. Does this mean
that every time I invoke a remote method, RMI creates a socket connection??
Is there a way to make a permanent connection?

2.- If I register a remote client object reference (a callback) to the
server, and the pass this remote reference to another client (ie Client A
registers to Server, the Server gives Client B the ref of A), what will
happen? A and B will establish a TCP connection directly?

Well, Any ideas are welcome!!

Thanks!

Agustin.
 
A

Agustin Chernitsky

Hi Joe,

Thanks a lot for the quick reply! One more thing: Is it safe to use the
sun.rmi.transport setting? Since I read the Warning sign... about
standards.. bla bla...

Anyway, thanks a lot!

Agustin.
 
J

Joseph Dane

Agustin Chernitsky said:
Thanks a lot for the quick reply! One more thing: Is it safe to use the
sun.rmi.transport setting? Since I read the Warning sign... about
standards.. bla bla...

it's safe, but you'll have to be a little careful. Sun chose to
publicly document the settings, which is something they don't
typically do with internal, non-public APIs, because a lot of people
use their RMI implementation and need to tweak these parameters.

that said, they put that disclaimer up for a reason. if Sun decides
to change their implementation, those properties could change, and
they'd be under no obligation to tell you. I'd say that the
likelyhood of this is low, though, and anyhow if you stick with a
single version of Java you'll be safe.
 

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,776
Messages
2,569,603
Members
45,188
Latest member
Crypto TaxSoftware

Latest Threads

Top