This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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?
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.
Joined: May 25, 2011
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.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com