• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Local and server mode on the same VM

 
Oricio Ocle
Ranch Hand
Posts: 284
Debian Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello (SCJD) World!
Have you considered the possibility of having running on the same JVM several instances of the assignment app?
Locking then also might be neccesary at local mode.
I've just begun thinking about that, but here it is.
Singleton pattern seems to be a way. What do you think?
 
joe lin
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I think it is possible.just link tomcat do.we can create many contexts in
one tomcat,but every context seems to live in itself jvm.But all contexts
live in the same context in fact.so,i think it is possible to do that just
like what you said.
 
Oricio Ocle
Ranch Hand
Posts: 284
Debian Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Joe, but this question was directly related with a SCJD assignment requirement. Not in a generic context
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11854
185
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ignacio,

I think you are over thinking your application - it is only meant to be a simple application.

The instructions usually have a line similar to "You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server."

Don't concern yourself with running multiple programs through one VM or multiple VMs .

Regards, Andrew
 
Oricio Ocle
Ranch Hand
Posts: 284
Debian Firefox Browser Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Andrew!
Yes, mine also have these lines. Sorry!
Regards,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic