Update Dialects to return SQLExceptionConversionDelegate

Description

Currently dialects return a SQLExceptionConversion which takes on full responsibility for conversion. I added SQLExceptionConversionDelegate to support a more collaborative/chained approach. The idea is that eventually we would have just a single SQLExceptionConversion (or maybe it becomes a class instead of interface) that contains multiple SQLExceptionConversionDelegate instances to which it would delegate.

The SQLExceptionConversionDelegate instances would be determined from:

  1. a "static" one based on the JDBC 4 defined SQLException hierarchy

  2. one for SQLState codes for either X/Open or SQL-2003 codes, depending on java.sql.DatabaseMetaData#getSQLStateType

  3. vendor specific error code or SQLState interpretations via Dialect

Activity

Steve EbersoleFebruary 9, 2012 at 6:22 AM

Closing for 4.1 release

Former userFebruary 8, 2012 at 7:48 AM

Fixed in master.

Former userFebruary 3, 2012 at 12:28 PM

Steve EbersoleJanuary 6, 2012 at 8:54 PM

Or maybe we leave org.hibernate.dialect.Dialect#buildSQLExceptionConverter in place and just add org.hibernate.dialect.Dialect#buildSQLExceptionConversionDelegate, converting our implementations from the former to the latter.

The idea of org.hibernate.dialect.Dialect#buildSQLExceptionConverter would be that if the dialect returned any non-null value, we would use that without any other delegation.

Steve EbersoleJanuary 6, 2012 at 8:47 PM

Hardy, assigning to you because you said you wanted to look at this stuff. If not, no worries, assign it back to me..

Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created January 6, 2012 at 8:34 PM
Updated February 9, 2012 at 6:22 AM
Resolved February 8, 2012 at 7:48 AM

Flag notifications