I wish to hide any Hibernate specifics from the client, including the Exceptions. In a JTA managed environment the commit occurs outside any developer supplied try/catch blocks so it is not possible to catch and convert Exceptions that occur at commit time.
I see that Hibernate has an SQLExceptionConverter interface which I presume is used regardless of whether JTA is being used or not, however this requires an instance of JDBCException to be returned rather than allowing me to use a custom Exception hierarchy.
Is there a way of converting to a custom Exception hierarchy in a JTA managed environment?
|