Results 1 to 2 of 2
Thread: question about java rmi
- 06-30-2009, 12:21 PM #1
Member
- Join Date
- Jun 2009
- Posts
- 3
- Rep Power
- 0
question about java rmi
One session bean queries a database and the other one makes
permanent changes to the database. Why are they both stateless?
If two or more RMI clients, running at the same time, look up the same
bound name in the registry, is the result always a reference to the same
remote object?
Explain under what circumstances a problem could arise with such
concurrent RMI clients and without doing any coding, say how you could
avoid or limit such problems.
- 07-01-2009, 07:15 AM #2
Here are some very non-definitive answers to your questions...
The first question seems to deal with EJB. I don't know anything about EJB, but stateless means that each client request is handled independently of the previous request; that is, EJB doesn't keep track of values from previous requests from the same client.
The reason is that keeping track of session state is very costly, especially in a server that is designed to handle very large transaction volumes from many clients. Your application design should take into account that each transaction is independent of the others.
As for the second question, the answer should generally be "yes". However, that assumes that the look ups are identical and that a third process is not updating the registry.
Your third question sounds like an assignment from CS 510. However, ensuring that your registry doesn't change often and that changes are followed by flushing any caches would be a good start. If your "registry" is actually replicated over a number of servers, look at the replication process and the schedule, to ensure the servers are synchronized when the requests occur. Last, look at the registry entries themselves. The entries may have multiple references associated with them, and the service and clients may have discretion about which reference to use.
Similar Threads
-
Java swing question
By Godsent in forum New To JavaReplies: 4Last Post: 04-18-2009, 01:00 PM -
Java Architecture Question
By ronakppatel in forum Web FrameworksReplies: 1Last Post: 10-01-2008, 12:13 PM -
need a java code for this question!
By rose in forum New To JavaReplies: 3Last Post: 05-07-2008, 07:34 PM -
Java Question
By Jay-1.1 in forum New To JavaReplies: 11Last Post: 05-01-2008, 04:04 PM -
Java Review Question
By toad in forum New To JavaReplies: 1Last Post: 10-29-2007, 06:13 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks