Navigation Menu

Skip to content

Commit

Permalink
Fix to automatically detect z/OS DB2.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmichalek committed Dec 15, 2015
1 parent f8d51cc commit 650f583
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -230,7 +230,9 @@ protected static String[] determineDatabaseNameVersionSubprotocol(DataSource dat
}

if (nameVersion[0].toLowerCase().indexOf(DatabaseNamesConstants.DB2) != -1) {
if (nameVersion[0].toUpperCase().indexOf("Z") != -1) {
String productVersion = getDatabaseProductVersion(dataSource);
if (nameVersion[0].toUpperCase().indexOf("Z") != -1
|| (productVersion != null && productVersion.startsWith("DSN"))) {
nameVersion[0] = DatabaseNamesConstants.DB2ZOS;
} else if (nameVersion[0].indexOf("400") != -1) {
nameVersion[0] = DatabaseNamesConstants.DB2AS400;
Expand Down

0 comments on commit 650f583

Please sign in to comment.