From: Juergen H. <jho...@us...> - 2008-10-16 19:09:51
|
Update of /cvsroot/springframework/spring/src/org/springframework/orm/hibernate3 In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv23066/src/org/springframework/orm/hibernate3 Modified Files: SessionFactoryUtils.java Log Message: translates Hibernate's DataException into a Spring DataIntegrityViolationException (for consistency with SQLExceptionSubclassTranslator's handling of the JDBC 4 SQLDataException) Index: SessionFactoryUtils.java =================================================================== RCS file: /cvsroot/springframework/spring/src/org/springframework/orm/hibernate3/SessionFactoryUtils.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** SessionFactoryUtils.java 24 Jul 2008 11:45:51 -0000 1.42 --- SessionFactoryUtils.java 16 Oct 2008 19:09:34 -0000 1.43 *************** *** 630,636 **** return new InvalidDataAccessResourceUsageException(ex.getMessage(), ex); } - if (ex instanceof DataException) { - return new InvalidDataAccessResourceUsageException(ex.getMessage(), ex); - } if (ex instanceof LockAcquisitionException) { return new CannotAcquireLockException(ex.getMessage(), ex); --- 630,633 ---- *************** *** 639,642 **** --- 636,642 ---- return new DataIntegrityViolationException(ex.getMessage(), ex); } + if (ex instanceof DataException) { + return new DataIntegrityViolationException(ex.getMessage(), ex); + } if (ex instanceof JDBCException) { return new HibernateJdbcException((JDBCException) ex); |