• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI: who opens the data port first? client or server?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I've developed an application that uses a client application and a server application that communicate through RMI. Many of us know that with RMI, the port you specify is only used to establish the initial connection, and that a seperate port (chosen at random) is then used to send data (ie - objects, variables) back and forth between the server and client.

Due to firewall issues, I could not rely on this random chosen port. I had to fix this port to a certain value. To do this, I had to implement the RMISocketFactory so that I can control what port is used to establish a connection and what port used to send data. Here are my settings:
connection port: 11000
data port: 11100

Now, what I need to know, once again due to firewall issues, is who requests to open the connection port first and who requests to open the data port first.

I understand that the client obviously makes the first connection to the server, and hence it is the client that requests to open the connection port (in my case 11000). But after this, is it the server that requests to open the 11100 for data trannsfer as a response? Or does the client request this port to be opened together with the request to open the connection port?

I hope this question made sense, and I thank any responses in advance.

~gautam
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic