List of usage examples for java.sql Connection getNetworkTimeout
int getNetworkTimeout() throws SQLException;
From source file:com.adaptris.jdbc.connection.FailoverDatasourceTest.java
@Test public void testNetworkTimeout() throws Exception { Connection conn = new MyProxy(); try {//from w w w. ja v a2s . c o m try { conn.getNetworkTimeout(); } catch (SQLException e) { // Feature isn't supported by Derby } try { conn.setNetworkTimeout(Executors.newSingleThreadExecutor(), 1000); } catch (SQLException e) { // Feature isn't supported by Derby } } finally { JdbcUtil.closeQuietly(conn); } }