Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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
 
The longest recorded flight time of a chicken is 13 seconds. But that was done without this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic