public ProfileProperties verifyProfileKey(String key) {
		
		String sql = "select * from app.profiles"+ 
				" where key='"+key+"'";

		ProfileProperties retVal = null;
		
		 
		if( dbConn != null ) {
			try {
				Connection conn = dbConn.getConnection();
				Statement stmt  = conn.createStatement();
				
				ResultSet rs = stmt.executeQuery(sql);
				
				if( rs.next() ) {
					retVal = new ProfileProperties();
					retVal.setKey(key);
					retVal.setId(rs.getInt("id"));
					retVal.setRid(rs.getInt("rid"));
					retVal.setpPublic(rs.getBoolean("public"));
					retVal.setpEnabled(rs.getBoolean("enabled"));
					retVal.setReverse_cost(rs.getBoolean("reverse_cost"));
					retVal.setPgr_dd(rs.getBoolean("pgr_dd"));
					retVal.setPgr_sp(rs.getBoolean("pgr_sp"));

					Statement s = conn.createStatement();
					ResultSet r = s.executeQuery("select host from app.hosts "+
							"where id="+retVal.getId());
					
					List<String> hosts = new ArrayList<String>();
					
					while(r.next())
						hosts.add(r.getString("host"));
					
					String[] h = (String[])hosts.toArray(new String[0]);
					
					retVal.setHosts(h);
					r.close();
					s.close();
				}
				
				rs.close();
				stmt.close();
				conn.close();
			}
			catch( Exception e ) {
				e.printStackTrace();
			}
		}
		return retVal;
	}