wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Data Object creation in Remote Mode! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Data Object creation in Remote Mode!" Watch "Data Object creation in Remote Mode!" New topic
Author

Data Object creation in Remote Mode!

Vikas Sood
Ranch Hand

Joined: Sep 03, 2002
Posts: 109
Hi Mark,
I am using a connection factory to create an instance per client of RemoteData for remote access.
I am using creating an instance of Data like this:
private static Data data=new Data("db.db");
What i understand from my experience that this way i have created a globally available instance of Data,which is assigned a new instance of Data class the first time the RemoteData class is loaded on to the jvm.Am i right? I am a bit confused ! If what i am sugessting is right then i am going to have just one instance of Data for all my RemoteData instances.
Kindly comment.
VikasSood
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

That is basically correct, you pass the reference to that Data instance to the DataAccessRemote class that gets created and passed to the client. And yse that way there is one and only one Data class instance and each client ahs their own DataAccessRemote class.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data Object creation in Remote Mode!