File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes Quick question about java RMI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Quick question about java RMI" Watch "Quick question about java RMI" New topic

Quick question about java RMI

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 750
Hi, I'm interested in learning some RMI to use with my servlets/jsp pages.

I currently use Netbeans and glassfish V2 to run my web-apps locally.
And my website hosts server is tomcat, (not sure which version), which I export my local web-apps to as war files which works fine.

So to use RMI, I have to use java.rmi package which is in the standard jdk.
But do I need anything else special? or do I have to do anything with the tomcat server?which I couldn't, as I don't have access to it.

I don't really want to spend ages trying to figure something out, that I will never be able to get to work, so thats why I'm asking here first.

Thanks for any advice.
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

What exactly would you be using RMI for?

I mean, where I work our servlets also act as RMI clients, connecting to RMI servers on a different machine to get back-room data. Was that what you had in mind? Or are you still trying to figure out what you might use RMI for and you don't have a use case yet?

And have you read the RMI tutorial?
colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 750
I had a few ideas...

I've currently got a chat application, that uses AJAX.
but it works by calling a servlet every second, to see if the servlet context attributes have changed, then when a message is written, it writes to the servlet context, so other clients can then read it.

So basically I want one client to 'talk to' another via the server, perhaps using a ServletContextAttributeListener.

I need this to work on my website, which uses Apache Tomcat.
Is this possible?

I agree. Here's the link:
subject: Quick question about java RMI
It's not a secret anymore!