wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Local and server mode on the same VM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Local and server mode on the same VM " Watch "Local and server mode on the same VM " New topic
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: 11404
    
  81

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
 
Similar Threads
How to design the interface
forced to implement local locking
URLyBird's [Version 1.2.3] and lockCookie
Local DB Access
lock on local client