Win a copy of Event Streams in Action this week in the Java in General forum!

Red Marshall

+ Follow
since Oct 03, 2005
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Red Marshall

thanks for the post

my follow up reply is still concerning me however. Its possible that 2 or more instances of this system will be running..each using different db files.

But this is prob ok if your program dosnt allow this - hopefully.

Does your business methods in the non-networked mode call any of the locking methods?



my design at moment means that the methods create/update/delete assume that only 1 client is calling the method at that time. So i was going to handle all the locking within the business methods. (Bad?)

In that case whats the point of using locking at all in the business methods for the non-networked mode.

all the best,

I just came up with another brain teaser

scenario: My is a singleton..i've done because it seemed logical as 2 clients accessing the same db file must be using the same instance of

but what happens when you have 2 clients, accessing different db files? The singleton pattern no longer works as 2 distinct instances of are now needed for each db file.

There is a workaround to this by modifying the singleton pattern so that now has a static map of instances where the key is the db filename.

This seems like thoughts?
Hi all,

i've just had a thought regarding URLyBird and the non-networked mode and locking. It seems silly to think that in non-networked mode theres any use at all for locking records - i'm assuming that in this mode, theres only ever 1 client running and the db is not being shared.

So in my biz tier classes (book, search) my local biz class wont use the locking methods provided by the Data class at all.

However it just occured to me..what if a client in non-networked mode is running on the same machine as the server, and both are using the same database file? Has anyone considered this?

I'd really like to know if any thinks that any book() call should use locking, regardless of whether the client is in non-networked mode.