@Override public void open() throws ConnectionException { TestHostType type = TestHostType.get(getHost().getPort()); try { type.open(0); isOpen = true; monitor.incConnectionCreated(getHost()); } catch (ConnectionException e) { lastException = e; e.setHost(getHost()); monitor.incConnectionCreateFailed(getHost(), e); throw e; } }
@Override public void open() throws ConnectionException { TestHostType type = TestHostType.get(getHost().getPort()); try { type.open(0); isOpen = true; monitor.incConnectionCreated(getHost()); } catch (ConnectionException e) { lastException = e; e.setHost(getHost()); monitor.incConnectionCreateFailed(getHost(), e); throw e; } }
ConnectionException ce = ThriftConverter.ToConnectionPoolException(e).setHost(getHost()) .setLatency(System.currentTimeMillis() - startTime); monitor.incConnectionCreateFailed(getHost(), ce); throw ce; ConnectionException ce = ThriftConverter.ToConnectionPoolException(new RuntimeException("Error openning connection", t)).setHost(getHost()) .setLatency(System.currentTimeMillis() - startTime); monitor.incConnectionCreateFailed(getHost(), ce); throw ce;
ConnectionException ce = ThriftConverter.ToConnectionPoolException(e).setHost(getHost()) .setLatency(System.currentTimeMillis() - startTime); monitor.incConnectionCreateFailed(getHost(), ce); throw ce; ConnectionException ce = ThriftConverter.ToConnectionPoolException(new RuntimeException("Error openning connection", t)).setHost(getHost()) .setLatency(System.currentTimeMillis() - startTime); monitor.incConnectionCreateFailed(getHost(), ce); throw ce;