RMI object as proxy to some socket server in web server behinf firewall
Hi All,
In my problem , we actually have a multi threaded server component which runs inside the webserver and communicateds with client applications (a swing app ) over SSL sockets. This component accepts connections on some arbitary port say 1111 and services the client diff requests coming over that socket connection.
As we know that web server will be almost always behind a firewall, this firewall is blocking the port used by my server component ie 1111.
Then I thought of developing a RMI adapter on server side with a remote method say recvClientRequest().
All my swing clients will look up this RMI remote object and when ever they want to request some thing from my server component, intead of sending that data over socket as earlier they will call recvClientRequest() method on remote object.
And that RMI server object will inturn creates socket connection (socket creation done only once on recving first request from client )to that server component (as they both reside on same machine this will be allowed) and passes on thae data recved from client (some text).
I thought of this design as I know that RMI can tunnel thru firewall.
Can some experienced guys tell me whether this will fit the bill or am I missing some thing which will become a problem when I start implementing this.
Other questions I would like to know will be
Will this solution create any security related problems?
Can I get the servlet version of the CGI script that is supposed to route the RMI calls wrapped in HTTP post request to the RMI object ?
Any info and pointers to useful resources in his regard are very much appreciated.
Thank you all.
regards
Srikanth

