Added support for the DB2 AS400 Driver

Closes gh-4115
pull/4140/head
Marten Deinum 9 years ago committed by Stephane Nicoll
parent 7fd9d58fd6
commit bad8c1bee8

@ -207,6 +207,14 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator
},
AS400("DB2 UDB for AS/400", "SELECT 1 FROM SYSIBM.SYSDUMMY1") {
@Override
protected boolean matchesProduct(String product) {
return super.matchesProduct(product)
|| product.toLowerCase().contains("as/400");
}
},
INFORMIX("Informix Dynamic Server", "select count(*) from systables"),
FIREBIRD("Firebird", "SELECT 1 FROM RDB$DATABASE") {

@ -116,6 +116,8 @@ public class DataSourceHealthIndicatorTests {
assertThat(Product.forProduct("Apache Derby"), equalTo(Product.DERBY));
assertThat(Product.forProduct("DB2"), equalTo(Product.DB2));
assertThat(Product.forProduct("DB2/LINUXX8664"), equalTo(Product.DB2));
assertThat(Product.forProduct("DB2 UDB for AS/400"), equalTo(Product.AS400));
assertThat(Product.forProduct("DB3 XDB fur AS/400"), equalTo(Product.AS400));
assertThat(Product.forProduct("Informix Dynamic Server"),
equalTo(Product.INFORMIX));
assertThat(Product.forProduct("Firebird 2.5.WI"), equalTo(Product.FIREBIRD));

@ -93,7 +93,12 @@ enum DatabaseDriver {
/**
* DB2 Server.
*/
DB2("com.ibm.db2.jcc.DB2Driver", "com.ibm.db2.jcc.DB2XADataSource");
DB2("com.ibm.db2.jcc.DB2Driver", "com.ibm.db2.jcc.DB2XADataSource"),
/**
* DB2 AS400 Server.
*/
AS400("com.ibm.as400.access.AS400JDBCDriver", "com.ibm.as400.access.AS400JDBCXADataSource");
private final String driverClassName;

Loading…
Cancel
Save