• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running Of Client / Server code on different VM.s

 
Gurpreet Saini
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi reader,
I would be implementing my DataAccess interface and LocalDataAccess and RemoteDataAccess classes in suncertify.db package. The only case is if they test by seperating client server ,code then they had to seperate suncertify.client and db package on one VM and suncertify.server and db on other. By keeping in mind if they test code seperatly in remote mode (Not on same VM). Then Is it ok ?. Especially with the design when all the exceptions and data accessing classes are in db package ?. Is it OK for the db package to be present on both the VM's ?.
Please comment as soon as possible.
Thank you,
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Serialization is not guaranteed across different VMs, so that would not be fair test.
HTH,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
 
friso dejonge
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
max,
can you expand your answer. Serialization is not guaranteed....
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure. Take the String class. Say that it contained a member variable in java 1.2, which was subsequently removed in version 1.3. Now, if you serialize across 1.2 VM to another 1.2 VM, then there's no problem, because they both expect that variable to be there. However, from a 1.2 to a 1.3 VM, you have a problem, because you're trying to fit this variable into a new, 1.3 class that isn't prepared to recieve it.
However, in reading over the original question again, I wonder if I'm answer a question that wasn't asked. That is, I'm assuming that when you say different VM, you mean differnt versions of the VM. IF you mean the same version, then there's no problem.
HTH,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
 
Gurpreet Saini
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Yes, but if they test on two diferent machines ?. By decoupling client and server. Will my above said approach will work ?.
Thank you,
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If they use the same VM version, then yes, absolutely.
M
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic