-
1. Re: Custom SQLWarning
shawkins Jan 24, 2012 1:44 PM (in response to rokhmanov)Andriy,
What you are doing should work. I have reopened https://issues.jboss.org/browse/TEIID-1829, as I can see that we are passing back all warnings as partial results warnings. Even if you use a SQLWarning, your exception will still be wrapped on the client by a TeiidSQLWarning.
Steve
-
2. Re: Custom SQLWarning
shawkins Jan 24, 2012 4:47 PM (in response to shawkins)Andriy,
Please see the latest check-in under https://issues.jboss.org/browse/TEIID-1829. Also even if you use SQLWarning as your exception, we'll wrap each top level exception in a TeiidSQLWarning and produce a chain of those. So based upon your example above:
TeiidSQLWarning warning = (TeiidSQLWarning)stmt.getWarnings();
SQLWarning wrapper = warning.getCause();
SQLWarning message = warning.getNextWarning();
You can also use whatever exception object you like. SQLWarnings are not required.
Steve
-
3. Re: Custom SQLWarning
rokhmanov Jan 25, 2012 5:49 PM (in response to shawkins)Thanks Steven, the patch works.
On a little bit different subject. I am thinking about automation the process of receiving patches on our end. I see daily SNAPSHOT build ( http://hudson.jboss.org/hudson/job/Teiid%20-%20Continuous%20Build/ ), what about fixes to already released version, are the artifacts available somewhere to download? Maven JBoss Snapshots and JBoss Releases repositories does not have recently built teiid 7.6 jars (only final release from last year). If not - I'll probably set up daily build in my local Hudson using your anonymous SVN, at least for 7.7.x branch.
-
4. Re: Custom SQLWarning
shawkins Jan 25, 2012 8:57 PM (in response to rokhmanov)Andriy,
Glad to hear the patch worked. Unfortunately there aren't any places to pick up the maintainence brach builds or mvn artifacts at this time. Given the dual nature of 7.7/8.0 we'll probably set up a 7.7 Hudson job, but that will not track further changes to the 7 series after 7.7 is released. You're best bet for something other than trunk would be to have your own local build.
Steve