Closed spring-projects-issues closed 19 years ago
Juergen Hoeller commented
Thanks for reporting this! I've adapted SQLErrorCodesFactory's check to startsWith("DB2"), which should cover DB2 on AS/400 too.
Juergen
Dustin Bruzenak commented
No problem. Thanks for the quick response and for a great framework.
Thomas Risberg commented
I added some additional functionality to this feature. We can now support wildcard expression either for trailing or leading text or also for both. You will need to add a "databaseProductName" property to the bean definition in sql-error-codes.xml. Here is an example:
\
The wildcards can be specified as DB2, DB2 or DB2 depending on the matching required.
The specific DB2 test is still in the code, but it is "deprecated" and will be removed in a later release. The above mentioned functionality provides more flexibility and is a general solution that will work for other databases as well.
Thomas
Dustin Bruzenak commented
Nice feature. Definitely better than the solution that was in place. That should allow us to grow to new DBs in the future.
Dustin Bruzenak opened SPR-198 and commented
When connecting to an iSeries using the IBM DB2 drivers, the SQLErrorCodes object in SQLErrorCodesFactory is not detected as a version of DB2 and is set to null.
This appears to be because the version 6 drivers return "DB2 UDB for AS/400" on the dbmdInfo.get("DatabaseProductName") call (SQLErrorCodesFactory, line 190). The check on line 193 of the same file references responses beginning with "DB2/" as DB2 and thus ignores this response.
Affects: 1.0.2