public boolean resolve(String domain) {
		if (domain == null || domain.isEmpty())
			return false;

		try {
			addr = Address.getByName(domain);

			logger.info("Start querying DNS.");
			Lookup lookUpAgent = new Lookup(domain, Type.ANY);

			// Print the DNS server used by dnsjava
			resolvers = ResolverConfig.getCurrentConfig().servers();
			for (int i = 0; i < resolvers.length; i++) {
				logger.info("Resolver's default: " + resolvers[i]);
			}

			// Send DNS query
			lookUpAgent.run();
			records = lookUpAgent.getAnswers();
			for (int i = 0; i < records.length; i++) {
				logger.info("Records: " + records[i]);
			}
			logger.info("Searching complete.");
			return true;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return false;
	}