| Author |
Local and server mode on the same VM
|
Oricio Ocle
Ranch Hand
Joined: Nov 30, 2004
Posts: 284
|
|
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?
|
SCJP, OCMJD, OCMJEA
|
 |
joe lin
Greenhorn
Joined: Dec 07, 2004
Posts: 28
|
|
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.
|
Looking for better solution...<br />SCJP1.4
|
 |
Oricio Ocle
Ranch Hand
Joined: Nov 30, 2004
Posts: 284
|
|
|
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
Joined: Mar 28, 2003
Posts: 10816
|
|
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
|
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
|
 |
Oricio Ocle
Ranch Hand
Joined: Nov 30, 2004
Posts: 284
|
|
Thank you Andrew! Yes, mine also have these lines. Sorry! Regards,
|
 |
 |
|
|
subject: Local and server mode on the same VM
|
|
|