public HashMap<String,Boolean> getRoles() throws Exception {

        Connection conn =null;
        Statement stmt = null;
        ResultSet rs=null;
        HashMap<String,Boolean> role = new HashMap<String,Boolean>();

        try{
            
            Class.forName("com.mysql.jdbc.Driver");
            
            conn=DriverManager.getConnection(url);
            
            stmt = conn.createStatement();
            String sql;
            sql ="SELECT * from USER_ROLES";
            rs= stmt.executeQuery(sql);
            while (rs.next()) {
		String r = rs.getString("ROLE_NAME");
		if(!role.containsKey(r))role.put(r,false);
            }
            return role;
	}   
	catch(SQLException sqle){
            throw new Exception(sqle);
	}
        finally{
 	    try{
		rs.close();
            }
            catch(Exception e) {}
            try{
		stmt.close();
            }
	    catch(Exception e) {}
            try {
		conn.close();
            }
            catch(Exception e){}
        }
     }