• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

share one instance of remote object

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

Suppose I have class Data implements DBMain as the test requires, then my network server registers an instance of Data.

It seems that all clients will share that single instance of Data. I wonder if there is a way allowing each client to have one instance of Data?

The only way I can think of is to register a DataFactory object and have each client to call its createData() method and get back a Data instance. I do not think it is necessary or even appropriate for JDCert exam.

But I am just wondering if anyone would suggest this approach, i.e., each client has its own Data interface and provide synchronization on its static members.

Thanks.
Yan
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Check out these threads. I used them when pondering the same question:
Habibi book: How many instances of remote object and Data object exist ?
Topic: Multiple instances of Data.
Topic: Single or multiple instances of Data class
Topic: NX: What is the point of multiple instances?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic