Hi Max, you're book has been very useful but I have a question concerning your implementation of RMI. On page 126 you have a discussion point about multithreaded DVDDatabase objects vs. Single DVDDatabase objects. You say that "we choose to implement DVDDatabse in a manner consistent with figure 4-13. That is, several instances of the DVDDatabase object can exist." Now here's my question: How can several DVDDatabase objects exist when you create only one instance in your RegDVDDatabase class and bind it to the RMIRegistry? Won't all remote clients share this instance? So isn't your program more like figure 4-14? A Single DVDDatabase object being shared by multiple clients? Please tell me where I'm going wrong with this, because I'm sure I'm mucking something up somewhere.
town drunk ( and author)
Joined: Jun 27, 2002
Hi Joy, I can see where you might find the passage confusing. The point is that the sample code, as written, is robust enough that it could accommodate figure 4-13: the static vector takes on the role of the class-wide coordinating structure. However, we're not using it to it's fullest extent. It's only used in a manner consistent with figure 4-14. Basically, what we're saying is that we have a car that could go 200 mph, but we're only driving 65 mph. M