Java Code Examples for org.apache.phoenix.jdbc.PhoenixEmbeddedDriver#close()
The following examples show how to use
org.apache.phoenix.jdbc.PhoenixEmbeddedDriver#close() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BaseTest.java From phoenix with Apache License 2.0 | 6 votes |
protected static boolean destroyDriver(Driver driver) { if (driver != null) { assert(driver instanceof PhoenixEmbeddedDriver); PhoenixEmbeddedDriver pdriver = (PhoenixEmbeddedDriver)driver; try { try { pdriver.close(); return true; } finally { DriverManager.deregisterDriver(driver); } } catch (Exception e) { logger.warn("Unable to close registered driver: " + driver, e); } } return false; }
Example 2
Source File: BaseTest.java From phoenix with Apache License 2.0 | 6 votes |
protected static boolean destroyDriver(Driver driver) { if (driver != null) { assert(driver instanceof PhoenixEmbeddedDriver); PhoenixEmbeddedDriver pdriver = (PhoenixEmbeddedDriver)driver; try { try { pdriver.close(); return true; } finally { DriverManager.deregisterDriver(driver); } } catch (Exception e) { LOGGER.warn("Unable to close registered driver: " + driver, e); } } return false; }