This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

share one instance of remote object

 
Yan Zhou
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • 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
 
Jared Chapman
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic