/** * Tries to start the server. * @return the server if successful * @throws SQLException if the server could not be started */ public Server start() throws SQLException { try { started = true; service.start(); String name = service.getName() + " (" + service.getURL() + ")"; Thread t = new Thread(this, name); t.setDaemon(service.isDaemon()); t.start(); for (int i = 1; i < 64; i += i) { wait(i); if (isRunning(false)) { return this; } } if (isRunning(true)) { return this; } throw DbException.get(ErrorCode.EXCEPTION_OPENING_PORT_2, name, "timeout; " + "please check your network configuration, specially the file /etc/hosts"); } catch (DbException e) { throw DbException.toSQLException(e); } }
/** * Tries to start the server. * @return the server if successful * @throws SQLException if the server could not be started */ public Server start() throws SQLException { service.start(); Thread t = new Thread(this); t.setName(service.getName() + " (" + service.getURL() + ")"); t.start(); for (int i = 1; i < 64; i += i) { wait(i); if (isRunning(false)) { return this; } } if (isRunning(true)) { return this; } throw Message.getSQLException(ErrorCode.CONNECTION_BROKEN); }
/** * Tries to start the server. * @return the server if successful * @throws SQLException if the server could not be started */ public Server start() throws SQLException { try { started = true; service.start(); String name = service.getName() + " (" + service.getURL() + ")"; Thread t = new Thread(this, name); t.setDaemon(service.isDaemon()); t.start(); for (int i = 1; i < 64; i += i) { wait(i); if (isRunning(false)) { return this; } } if (isRunning(true)) { return this; } throw DbException.get(ErrorCode.EXCEPTION_OPENING_PORT_2, name, "timeout; " + "please check your network configuration, specially the file /etc/hosts"); } catch (DbException e) { throw DbException.toSQLException(e); } }
/** * Tries to start the server. * @return the server if successful * @throws SQLException if the server could not be started */ public Server start() throws SQLException { try { started = true; service.start(); String name = service.getName() + " (" + service.getURL() + ")"; Thread t = new Thread(this, name); t.setDaemon(service.isDaemon()); t.start(); for (int i = 1; i < 64; i += i) { wait(i); if (isRunning(false)) { return this; } } if (isRunning(true)) { return this; } throw DbException.get(ErrorCode.EXCEPTION_OPENING_PORT_2, name, "timeout; " + "please check your network configuration, specially the file /etc/hosts"); } catch (DbException e) { throw DbException.toSQLException(e); } }