• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Locking in Standalone mode

 
Don Burke
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I dont think the standalone client's business methods that alter the db should use locking. I think that they should assume they are the only client using the database and thus not worry about concurrency issues.

However i have found something in the spec i havent been able to resolve so i need a bit of help here, what if a client is used in standalone mode, whist on the same machine the server is running and using the same database file as the standalone client. This will cause hell seeming the standalone client is not supporting locking.

Has someone else ever considered this problem? Is it safe to assume that the standalone app will never be in this situation?

this one is holding me back a bit from finishing my design.

cheers

Don

[ October 31, 2005: Message edited by: Don Burke ]
[ October 31, 2005: Message edited by: Don Burke ]
 
Pawel Poltorak
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

My instructions state, that at any momeny, at most one program is accessing the database file. Then I think situation you described should not happen as client and server are two programs.

Hope it helps,
Pawel
 
Don Burke
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Pawel,

Are you implemented locking in you standalone mode client? It does make sense to not do so as you pointed out.

Its best to document this as an assumption in our documentation.

Cheers,

Don
 
lydie prevost
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you can see in this thread testing multi threading with local and server running on the same machine
I am having problem with it......

- Lydie
 
Pawel Poltorak
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Don,

Well, I must admit that I have the locking code in standalone client mode, because it is the same code as for server (it is in a business layer). But your post got me thinking, and maybe I will move my locking code from Service class (which is part of business layer) into RemoteService (which uses Service class as delegate and extends it's functionality by throwing RemoteException).

On the other hand, I think that locking code can be kept even in stanalone client for the sake of clearness. It will not make any harm anyway.

Best Regards,
Pawel
[ November 07, 2005: Message edited by: Pawel Poltorak ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic