This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply 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: 10816
    
  25

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,
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Local and server mode on the same VM
 
Similar Threads
lock on local client
How to design the interface
forced to implement local locking
URLyBird's [Version 1.2.3] and lockCookie
Local DB Access