• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Quick question about java RMI

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21111
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic