RMI client behind a firewall, server behind a firewall too

R

Robert Dodier

Hello,

Browsing the web & newsgroups, it looks like this problem doesn't
have any kind of easy solution, but let's see if someone knows different.

I want to have a RMI client behind a firewall and a RMI server
behind another firewall. I don't have any control over the firewalls.
I know port 80 will be open for http traffic, but that's it.
The web server on either side isn't the same as the machine running
the RMI client or server.

I want the client to be able to call methods on server objects
and also to enable callbacks from the server to the client.

What can be done in this case? I've read the RMI docs at Sun,
browsed through a few dozen webpages & news messages, and the
situation looks pretty dark, actually. Maybe someone has cause
for optimism here. Thanks for any information.

Robert Dodier
 
A

Alexander Ames

Hello,

Browsing the web & newsgroups, it looks like this problem doesn't
have any kind of easy solution, but let's see if someone knows different.

I want to have a RMI client behind a firewall and a RMI server
behind another firewall. I don't have any control over the firewalls.
I know port 80 will be open for http traffic, but that's it.
The web server on either side isn't the same as the machine running
the RMI client or server.

I want the client to be able to call methods on server objects
and also to enable callbacks from the server to the client.

What can be done in this case? I've read the RMI docs at Sun,
browsed through a few dozen webpages & news messages, and the
situation looks pretty dark, actually. Maybe someone has cause
for optimism here. Thanks for any information.

Robert Dodier

I believe it can be done through HTTP tunnelling. Do a web search on
that. You need a servlet to forward the requests. (Can you run
servlets in your web server?) I think Sun provides one but you might
need to change it if the RMI server is on a different machine from the
web server.
 
M

Matthias Kraft

You can define sockets for the stub and the skeleton (Class
RMISocketFactory).
---schnipp---
public class HelloImpl implements Hello{
public HelloImpl() throws RemoteException{
UnicastRemoteObject.export(this, 80, new MyClientFactory(), new
MyServerFactory());
}
---schnapp---
If you need a complete example, write me.
RMI is written for use in an Intranet. A better way is to use Webservices
to solve your problem (e.g. AXIS).

Andres
 
S

Sudsy

Matthias said:
You can define sockets for the stub and the skeleton (Class
RMISocketFactory).
---schnipp---
public class HelloImpl implements Hello{
public HelloImpl() throws RemoteException{
UnicastRemoteObject.export(this, 80, new MyClientFactory(), new
MyServerFactory());
}
---schnapp---
If you need a complete example, write me.
RMI is written for use in an Intranet. A better way is to use
Webservices to solve your problem (e.g. AXIS).

To the OP: You've had two good replies here. I must admit that I was
thinking Web Services simply because of portability issues. But the
proxy approach is mature and enjoys wide support.
IOW, you'd be well served by either solution.
Good luck!
 
A

Alex Molochnikov

If you have no control over the firewalls at all, then there is no solution.
However, if you can negotiate opening of a few ports with the admin, then
the solution does exist. If the latter is the case, let me know and I will
walk you through the setup.

Alex Molochnikov
Gestalt Corporation
www.gestalt.com
 
H

heidi

Alexander Ames said:
I believe it can be done through HTTP tunnelling.

The OP wanted to do callbacks to the client. The HTTP tunnelling will not
allow that.
 
M

Matthias Kraft

To the OP: You've had two good replies here. I must admit that I was
thinking Web Services simply because of portability issues. But the
proxy approach is mature and enjoys wide support.
IOW, you'd be well served by either solution.
Good luck!

Thanks. I will try to keep this quality and improve my english.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top