Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

RMI callback over firewall - proposed solution

843793Oct 18 2004 — edited Oct 25 2004
Guys,

We have a client/server application where callbacks from the Server to Client are utilised. As expected, this works great with no firewall. Chuck a firewall in front of the client though, and the game's off.

I've been reading through this forum, and have been progressively getting more and more worried with each related topic.

"YOU CANT DO IT", they scream.

Now, Im not too hot on my RMI (i've merely dabbled), but the way I see it is when a callback is made, another connection is established, this time from the server to the client. What gets me is this if we can control the port utilised when the client connects to the server, why cant we control the port utilised when the server connects to the client. Isnt it the same mechanism really, but only in reverse??

Important point - all we need to do is control this port that the server uses to talk to the client. The administrators of the client firewall will then open the correct port. WE JUST WANT TO CONTROL IT.

So, if we cant specify the port directly, does the following solution sound feasable?

1) The client registers itself in a 'client' RMI registry with a unique reference.
2) The client looks up the server in the 'server' RMI registry, and upon connection, gives it the unique reference as created in step 1.
3) Upon connection of the client, the server looks up the connected client in the 'client' RMI Registry using the given unique reference, and stores the returned object.
4) Any callback in the current code would then utilise the object obtained in step (3), effectively reversing the role of the server & client temporarily.

Now using the above steps, coupled with the fact that we can control what port is used for a client connecting to a server, will this get around the client firewall issue?

Any thoughts with regards to performance etc?? Im just after some ideas from RMI gurus before I start hacking unfamiliar code :)

Cheers,
Lee.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2004
Added on Oct 18 2004
6 comments
170 views