public int getDriverMinorVersion() { if (this.driver == null) { return -1; } return this.driver.getMinorVersion(); }
public int getRawDriverMinorVersion() { int version = -1; if (this.driver != null) { version = driver.getMinorVersion(); } return version; }
@Override public int getRawDriverMinorVersion() { return rawDriver.getMinorVersion(); }
@Override public int getMinorVersion() { return driver.getMinorVersion(); }
public int getRawDriverMinorVersion() { int version = -1; if (this.driver != null) { version = driver.getMinorVersion(); } return version; }
/** * Returns the wrapped driver's minor version number. * * @return the wrapped driver's minor version number * @see java.sql.Driver#getMinorVersion() */ @Override public int getMinorVersion() { return this.driver.getMinorVersion(); }
@Override public int getMinorVersion() { return driver.getMinorVersion(); }
@Override public int getMinorVersion() { return delegate.getMinorVersion(); }
@Override public int getMinorVersion() { return proxyDriver.getMinorVersion(); } @Override
@Override public int getMinorVersion() { return this.driver.getMinorVersion(); }
@Override public int getMinorVersion() { return this.driver.getMinorVersion(); }
protected void initCheck() throws SQLException { if (JdbcUtils.ORACLE.equals(this.dbType)) { isOracle = true; if (driver.getMajorVersion() < 10) { throw new SQLException("not support oracle driver " + driver.getMajorVersion() + "." + driver.getMinorVersion()); } if (driver.getMajorVersion() == 10 && isUseOracleImplicitCache()) { this.getConnectProperties().setProperty("oracle.jdbc.FreeMemoryOnEnterImplicitCache", "true"); } oracleValidationQueryCheck(); } else if (JdbcUtils.DB2.equals(dbType)) { db2ValidationQueryCheck(); } else if (JdbcUtils.MYSQL.equals(this.dbType) || JdbcUtils.MYSQL_DRIVER_6.equals(this.dbType)) { isMySql = true; } if (removeAbandoned) { LOG.warn("removeAbandoned is true, not use in productiion."); } }
protected void initCheck() throws SQLException { if (JdbcUtils.ORACLE.equals(this.dbType)) { isOracle = true; if (driver.getMajorVersion() < 10) { throw new SQLException("not support oracle driver " + driver.getMajorVersion() + "." + driver.getMinorVersion()); } if (driver.getMajorVersion() == 10 && isUseOracleImplicitCache()) { this.getConnectProperties().setProperty("oracle.jdbc.FreeMemoryOnEnterImplicitCache", "true"); } oracleValidationQueryCheck(); } else if (JdbcUtils.DB2.equals(dbType)) { db2ValidationQueryCheck(); } }
public static void startDriverServices(final ServiceTarget target, final ModuleIdentifier moduleId, Driver driver, final String driverName, final Integer majorVersion, final Integer minorVersion, final String dataSourceClassName, final String xaDataSourceClassName) throws IllegalStateException { final int majorVer = driver.getMajorVersion(); final int minorVer = driver.getMinorVersion(); if ((majorVersion != null && majorVersion != majorVer) || (minorVersion != null && minorVersion != minorVer)) { throw ConnectorLogger.ROOT_LOGGER.driverVersionMismatch(); } final boolean compliant = driver.jdbcCompliant(); if (compliant) { SUBSYSTEM_DATASOURCES_LOGGER.deployingCompliantJdbcDriver(driver.getClass(), majorVer, minorVer); } else { SUBSYSTEM_DATASOURCES_LOGGER.deployingNonCompliantJdbcDriver(driver.getClass(), majorVer, minorVer); } InstalledDriver driverMetadata = new InstalledDriver(driverName, moduleId, driver.getClass().getName(), dataSourceClassName, xaDataSourceClassName, majorVer, minorVer, compliant); DriverService driverService = new DriverService(driverMetadata, driver); final ServiceBuilder<Driver> builder = target.addService(ServiceName.JBOSS.append("jdbc-driver", driverName.replaceAll("\\.", "_")), driverService) .addDependency(ConnectorServices.JDBC_DRIVER_REGISTRY_SERVICE, DriverRegistry.class, driverService.getDriverRegistryServiceInjector()) .setInitialMode(ServiceController.Mode.ACTIVE); builder.install(); }
final Driver driver = constructor.newInstance(); final int majorVersion = driver.getMajorVersion(); final int minorVersion = driver.getMinorVersion(); final boolean compliant = driver.jdbcCompliant(); if (compliant) {
.pad(driver.jdbcCompliant() ? "yes" : "no", 10) .pad(driver.getMajorVersion() + "." + driver.getMinorVersion(), 8) .append(name); if (driver.jdbcCompliant()) {
public int getRawDriverMinorVersion() { int version = -1; if (this.driver != null) { version = driver.getMinorVersion(); } return version; }
public int getDriverMinorVersion() { if (this.driver == null) { return -1; } return this.driver.getMinorVersion(); }
proxyDriver.getMinorVersion(); proxyDriver.jdbcCompliant(); proxyDriver.getParentLogger();
@Test public void testVersion() throws Exception { Driver driver = new P6SpyDriver(); assertEquals(2, driver.getMajorVersion()); assertEquals(0, driver.getMinorVersion()); }