private boolean isPortInUse(String hostName, int port) {
		Socket socket = null;
		try {
			socket = new Socket(hostName, port);
			return true;
		} catch (IOException e) {
			return false;
		} finally {
			try {
				if (socket != null) {
					socket.close();
				}
			} catch (IOException e) {
				logger.error(e.getMessage(), e);
			}
		}

	}