Why is basically rmi used in java?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Ranjith_Pillai
Posted On:   Thursday, July 22, 2010 08:11 AM

I have read some articles about java rmi. But i am not very clear about it. Suppose if i am making a book stall management system in java. This system will be used by multiple users.This system will have a order module, where the users of the system will be placing orders for books. The inventory records will be stored in an oracle server.Now there is a possibility that two users will be placing order for the same book(Book A) at the same time. since oracle itself handles concurrency, there wont be a concurrency problem. But the problem is that, both the users will see the same quantity for Book A before placing the order, but after placing the order only one gets executed and the other one gets and error message since there is no book left after the first    More>>

I have read some articles about java rmi. But i am not very clear about it.
Suppose if i am making a book stall management system in java. This system will be used by multiple users.This system will have a order module, where the users of the system will be placing orders for books. The inventory records will be stored in an oracle server.Now there is a possibility that two users will be placing order for the same book(Book A) at the same time. since oracle itself handles concurrency, there wont be a concurrency problem. But the problem is that, both the users will see the same quantity for Book A before placing the order, but after placing the order only one gets executed and the other one gets and error message since there is no book left after the first gets executed.

How can this problem be avoided. Where exactly is the use of rmi in such a module.

   <<Less

Re: Why is basically rmi used in java?

Posted By:   Wei_Wu  
Posted On:   Sunday, September 26, 2010 05:18 AM

There is no need to RMI for small systems. But suppose your book store wants to ask another system for some guy's credit record, RMI is one of solutions.
About | Sitemap | Contact