[teiid-issues] [JBoss JIRA] (TEIID-3360) Provide an option to virtualize source exceptions

Steven Hawkins (JIRA) issues at jboss.org
Tue Apr 14 15:06:18 EDT 2015


    [ https://issues.jboss.org/browse/TEIID-3360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059019#comment-13059019 ] 

Steven Hawkins commented on TEIID-3360:
---------------------------------------

This would require a hard dependency on hibernate to be done at the source level.  We'd need to get the relevant SQLExceptionConversionDelegate and then construct a StandardSQLExceptionConverter for the translator and then return the converted exception for any sqlexception that was the cause for translator exception.  The Teiid dialect on top then would then just need to pull out the underlying JDBCException.  

An alternative approach would be to allow the Teiid dialect to take a list of names of the JDBC source types being accessed such that it constructs a composite SQLExceptionConversionDelegate.

The final approach would be to redevelop similar handling on our own outside of hibernate - and consider using it for the non-JDBC sources as well.

> Provide an option to virtualize source exceptions
> -------------------------------------------------
>
>                 Key: TEIID-3360
>                 URL: https://issues.jboss.org/browse/TEIID-3360
>             Project: Teiid
>          Issue Type: Enhancement
>          Components: Query Engine
>            Reporter: Steven Hawkins
>            Assignee: Steven Hawkins
>             Fix For: 8.11, Open To Community
>
>
> Currently we'll pass the source exception along with the Teiid exception.  And from source sql exceptions we'll also rely the sql state/code.  When connecting to databases of different types it would be best to return a common set of codes.
> There is exception mapping logic in Hibernate that we could reuse, but this could apply to the non-jdbc sources such that a predictable code will seen by Teiid clients.



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the teiid-issues mailing list