db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <Arieh.Mar...@Sun.COM>
Subject Concurrency in connections and Threads
Date Wed, 09 Nov 2005 17:18:38 GMT
I am using Derby in 'embedded' mode.

A pool of worker threads takes jobs from a queue and following
processing populates different tables.

So far, in my implementation, all threads shared the same connection.

I am wondering whether there are any resulting concurrency issues
that I may not be aware of.

My assumptions are as follows:

 - the threads are well behaved among themselves relative to (java) 

 - no two threads update the same database table at any given moment

 - table lock granularity is what is in place in Derby

Based on that, the same connection (albeit processing different tables)
may be used by different threads without creating unnecessary contention.

Are those assumptions true ?



PS: please, reply directly, as I am not in the aliases ...

 Arieh Markel                           Sun Microsystems Inc.
 CNS CTO - Advanced Technology          500 Eldorado Blvd. MS UBRM05-169
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 http://blogs.sun.com/arieh             Phone: (303) 272-8547 x78547

View raw message