aspose file tools*
The moose likes Distributed Java and the fly likes New to RMI; question of suitability for use Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "New to RMI; question of suitability for use" Watch "New to RMI; question of suitability for use" New topic
Author

New to RMI; question of suitability for use

Charles McGuire
Ranch Hand

Joined: Jan 18, 2005
Posts: 99
Hi -

I've got a Tomcat Server (container) that sits on the other side of our company firewall. It needs information from a database that sits on the inside of the company firewall. I have another Tomcat server on the inside of the firewall.

Rather than supply the outside-the-firewall server with the info to access our database, I'm thinking that RMI to the other server, which would do the DB accessing, would be more secure. Is that true, and is RMI the best way to do this or should I be considering an alternative?

On another, completely unrelated note, Peter, check your private messages.
[ October 28, 2007: Message edited by: Charles McGuire ]

There's no place like 127.0.0.1
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

As far as i understood. You wanted to make a call from one Tomcat server to another. isnt?
I assume you will have a servlet on the tomcat server sitting behind the firewall that will do the DB processing. If so, why do you need RMI? You can directly call the servlet with appropriate parameters. Correct me if i have mistaken the problem.


apigee, a better way to API!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12682
    
    5
Getting data through firewalls using HTTP sounds like SOAP or XML-RPC to me. Why are you even thinking of RMI?

Bill


Java Resources at www.wbrogden.com
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4639
    
    5

I agree with William, don't use RMI, you can't reliably get thru firewalls. Even if it works, it may stop when some new network admin changes the firewalls.

I recommend REST over SOAP and others.
Johnny Kewl
Greenhorn

Joined: Apr 16, 2007
Posts: 8
You need a POJO Application Server
http://coolharbor.100free.com/index.htm

It runs on Tomcat, so thats no problem.

You place it on the Tomcat inside the firewall.
You write a class that talks to the dB and drop it into the POJO App Server.

In the outside TC you
yourClass = loadRemoteClassInst("co.your.class.on.safe.server.MyClass")
String theName = yourClass.getNameInDb(); //etc etc

Literally... enjoy!

Oh.. POJO applications servers "RMI" on HTTP... no firewall problem.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: New to RMI; question of suitability for use
 
Similar Threads
keeping http clients up to date
Web File Reader
What is the role of Web Servers?
Authors: Other Security areas
Web application security