Greetings,

   I'm currently working on a Java client/server app that supports 
multiple databases. We're trying to utilize SQLServer 2000's transaction 
support, and so far, it has been fighting us. SQLServer 2k has a 
transaction policy of locking rows and not allowing for queries to read 
the data prior to an uncommitted transaction's changes. Thus, we're 
experiencing long delays when a query blocks while waiting on a long 
transaction to release its row locks. SQLServer 2k's default lock timeout 
is -1 (a query nevers times out when waiting on a locked row) and must be 
set per connection ("Set LOCK_TIMEOUT <timeoutinmilliseconds>").

   We're currently using OJB 1.0 rc4 and have modified the source to allow 
us to set the SS2k lock timeout. We've also added support for a 
"lock-timeout" attribute in the jdbc-connection-descriptor tag in 
repository_database.xml. For the setting of the lock timeout, I extended 
the initializeJdbcConnection method in the PlatformMsSQLServerImpl to 
include the above Set statement.

   Has anyone else had a problem regarding this issue before? Is there a 
better way to handle this policy in SQLServer 2000? And if not, should I 
submit these changes for review and possible inclusion in the next 
release?  Thanks in advance!

Best Regards,
Scott Gelb
Software Developer
Demand Management, Inc.

Reply via email to