|
From: Pierre B. <pie...@gm...> - 2005-02-22 16:41:03
|
Hi Juergen, In our project, we use an implementation of SQLExceptionTranslator to translate sybase error code '1205' in DeadlockLoserDataAccessException. From sybase documentation: "This error occurs when a process tries to acquire a lock on an object that is locked by a second process when the second process is waiting for a lock on an object that has been locked by the first process. This situation is a deadlock, and can involve more than two processes. Adaptive Server detects this situation, rolls back the transaction that has accumulated the least amount of CPU time, and notifies the application program of this action with Error 1205. This allows the other users' processes to move forward." We catch the DeadlockLoserDataAccessException in an ExceptionHandler and display a warning to user. Hope this helps. Pierre On Tue, 22 Feb 2005 13:12:23 +0100, Juergen Hoeller <ju...@in...> wrote: > Thomas, everybody, > > Please have a look at the following JIRA issue: > http://opensource.atlassian.com/projects/spring/browse/SPR-733 > > I agree that DeadlockLoserDataAccessException should be a subclass of > ConcurrencyFailureException (which has been introduced in Spring 1.1), and > have already changed this locally. > > However, DeadlockLoserDataAccessException isn't thrown anywhere; > SQLErrorCodes does not support it. So as indicated in SPR-733, should we > generally throw CannotAcquireLockException in such a case (which currently > seems to happen for some databases, as defined in sql-error-codes.xml)? > What's the semantic difference between those two exceptions, and is it worth > keeping both? > > Juergen |