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

[Help] Do we need t o take care of multiple JVM use the same of database file ?

 
Ryan Lu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
I need your suggestion.

The part of the description of SCJD instruction is shown below :
---------------------------------
Network Approaches
Your choice of RMI or serialized objects will not affect your grade, but
no other approach is acceptable. In either case, the program must allow
the user to specify the location of the database, and it must also
accept an indication that a local database is to be used, in which case,
the networking must be bypassed entirely. No authentication is required
for database access.
---------------------------------
I am confused about this description.
Dose it mean that we don't need to take care that the same database file
is been accessed by two or three (multiple) JVM ?

For example :
A database file, "testdb.db".
Running "runme.jar" and specifying the database
file, "testdb.db".
And running "runme.jar" again and specifying the same database
file, "testdb.db".
So, my confusion is that do we need to do something to avoid multiple
JVM to access the same database file ?

Thank you for your help first !
Network Approachesand it must also the user to specify the location of the database,do we need to do something to avoid multipleJVM to access the same database file ?
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ryan,
Welcome to JavaRanch and this forum!
Dose it mean that we don't need to take care that the same database file
is been accessed by two or three (multiple) JVM ?

You probably have in your instructions a sentence such as the following:
"You may assume that at any moment, at most one program is accessing the database file."
So, yes, you don't need to care about the file being accessed by multiple JVMs (or any other program). Practically, it means that locking at the file system level is not required.
Regards,
Phil.
 
Ryan Lu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Philippe,
Nice to meet you!
Thank you for your quickly response, and it is great.
Nice experience for my first time to post topic.
Thank you again, nice man!

Best Regards,
Ryan YH Lu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic