aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes B&S 2.2.1 Gui Display After a Booking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "B&S 2.2.1 Gui Display After a Booking" Watch "B&S 2.2.1 Gui Display After a Booking" New topic
Author

B&S 2.2.1 Gui Display After a Booking

Kevin Florish
Ranch Hand

Joined: Jan 06, 2009
Posts: 175
Here is an excerpt from the document supplied by sun:

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.


Network Server and Client

If I run the server and then run several clients and then book a contractor in one of them, when I do a search/search all in another client, the client has been updated with the booking when the search is displayed.

My data object singleton is created by my ServicesImpl class when Server mode is run so I have no problems with Network Clients.



Standalone

If I have another JVM running with the Standalone client, this display is not updated on a search/search all but only refreshed with the booking information if I restart the Standalone client.

Although my Data object is a singleton, the Standalone client will create one as this is running in a separate JVM.

I am using a cache to store the contractor records for less disk usage, which means that the Standalone has a seperate cache to the Network client when the data singleton is instantiated.

Does anyone know if this is the correct behaviour.

Java5 Tutorials | Java6 Tutorials | HTML/CSS Tutorials | JavaScript and jQuery Tutorials
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2264
    
    3

Hey, partner!

If I run the server and then run several clients and then book a contractor in one of them, when I do a search/search all in another client, the client has been updated with the booking when the search is displayed.


I did the same thing.

If I have another JVM running with the Standalone client, this display is not updated on a search/search all but only refreshed with the booking information if I restart the Standalone client.


The specification isn't really clear if we can run the application more than 1 time in standalone mode on the same machine. So, I assumed that only one instance of the application would run in standalone mode or in client mode, not both at the same time. So, you don't have to worry, for instance, if 2 instances of the application are running in standalone mode on the same machine. You may assume that, a client either runs the application in standalone mode or client mode. Just put it in your choices.txt and you'll be fine!

I hope I have answered your question


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
mohamed sulibi
Ranch Hand

Joined: Sep 04, 2005
Posts: 169
hi Roberto Perillo;

i think you are right; as the requirement explicitly specify that:

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.


as i understood it as we are don't worry about multiple program run ON the same database file. so i think any worry or care about this issue will be treated as OVERHEAD.

this is my opinion.

what you think guys?

Mohamed Sulibi
SCJP, SCJD in progress (from 1/8/2007 till now)
Kevin Florish
Ranch Hand

Joined: Jan 06, 2009
Posts: 175
Thanks fot the fast replies.

I am relieved that for once I don't have to change anything hurrah
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: B&S 2.2.1 Gui Display After a Booking