• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

do we need 2 database files one rmi one local???

 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI I am curious do we need 2 databases one for RMI and One for local
Thanks Lisa
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think so.
 
Glenn Opdycke-Hansen
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not think there is a need for 2 databases.

I have a class that has 2 constructors. One constructor is for local access to the db. The other is for remote access to the db. The class has methods to access the db class remotely or locally. However, after looking at the methods, I can see that there should be two classes instead of one, to improve the oo design.
Anyway, I do not know why there should be 2 databases.
 
Matt DeLacey
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For what it's worth, I used one file and passed.
With Respect,
Matt
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose we run the application in two machines (one is client machine and one server machine) then I feel 2 db.db files needed.
Regards,
Ruilin
 
Matt DeLacey
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you definately need the file on the computer on which you are running the server, and if you are running in local mode, you definately need a file on the client side.
 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I will ponder on the thought
Lisa
 
khyau
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IMHO:
1. always 1 db - otherwise, breaks integrity of db
2. client can access db both locally and remotely provided that he/she runs at the server machine; if not, he/she can only call remote methods.
 
KH Yau
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To the Adminstrator of this forum - I noticed my previous registrated name violated the convention required by this forum. now have it fixed. KH
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
KH Yau,
According what you said in above, the database can only stay in the client side.
Then, in a real application, there will be no justification for using Network. How are you going to explain this ?
Please comments
Ruilin
 
KH Yau
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I meant the db always resided at the server side. If client runs appl. at the server side of the machine, then client can access db directly while the server is set offline.
The project is initially a standalone appl. used at the "headquarter" - and we are asked to extend the application w/ client-server features so that branch offices can also book flights. However, we still want the appl. be able to access db directly at the head office - for testing or at the contingent situations when networking is done, say.
Have I missed any points? KH
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
KH Yau,
Thanks for the clarification. It makes good sense.
With respect
Ruilin
 
KH Yau
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I am unsure about my interpretation...
From Robert's book, it says the major intent of such sticky requirement is to ensure thread safety being implemented at the client side as well as in the server side. I cannot find at which page i saw this.
Many things on Robert's book (complete java 2 cert) I don't understand. Have u checked out that book? There are no complete code listing on its example projects. kh.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic