• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

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

 
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
 
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic