Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

B&S 2.2.1 Gui Display After a Booking

 
Kevin Florish
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
mohamed sulibi
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks fot the fast replies.

I am relieved that for once I don't have to change anything hurrah
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic