Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is Max's DVD example multiple instance or single instance?

 
David Chan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Max's DVD example, does the server implement as multiple instance or single instance? There is a static Vector variable to keep track of all DVDs that are reserved at any given time, but I do not see any connection factory used in the example (it seems the single instance serves for all client request). Can I say that is single instance and relys on RMI for mutlithreading? If it is single instance server, why he declare the Vector variable as static?
David
 
Alison Carter
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,
I'll try to explain what I understand about Max's example. As I'm new to all of this I may get somethings a bit mixed up, but I'm sure someone else will correct my mistakes.
In Max's DVD example, does the server implement as multiple instance or single instance?

I believe the RMI example that Max provides has a single remote object used by all client threads. Hence no connection factory.
If it is single instance server, why he declare the Vector variable as static?

Max declares the Vector variable as static so that it is shared for multiple instances. Remember Max also implemented the DVD solution using multiple instances for sockets and used the same DBClient/DVDDbAdapter for both sockets and RMI.
Alison
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic