• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any way to get underlying RMI Socket?

 
Alvin Watkins
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an RMI server talking to a Tomcat server. I now have need to create a Socket for clients that won't work properly with my RMI server. Instead of begging my IT guy to open ports for me and such, is there any way to return the underlying RMI Socket where I can write bytes to its output stream and have clients make a Socket connection there as well?
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It would help if you described your system (for example "talking to" is an imprecise term which doesn't identify which system is the client and which is the host). And it would help if you described your problem too -- right now you're asking about a proposed solution to this undescribed problem. It may happen (and given your proposed solution it's quite likely) that some other solution might be better. But it's impossible to tell without understanding the problem and its environment.
 
Alvin Watkins
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul. I got this resolved and I can see why my question was not well-formed.

Essentially, I need to have some way to network web-based clients. I have a Tomcat server where I deploy a war file that contains a client for my RMI server. The Tomcat server has a Flex servlet that takes requests, calls my client and returns Java objects to my Flex web-based clients. That works well until you need to start telling web-based clients what to do based on the goings-on in any particular web-based client. I discovered that Flex has a Socket class which would solve my problem if I can bind to that Socket. I figured I would try getting the RMI Socket and using that to write to its OutputStream. However, I then discovered that BlazeDS (the now Apache Flex communications framework) has an asynch listener. It calls an object on the web server which just keeps the connection alive until you're ready to close it. It's really fantastic and has been working wonderfully.

Thanks for your help. Sorry for the confused sounding post.

Best,
Al
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic