public void setUser(ProfileBean pb)  throws Exception{
        Connection conn =null;
        Statement stmt = null;
        int rs;

        try{
            Class.forName("com.mysql.jdbc.Driver");
            conn=DriverManager.getConnection(url);
            
            stmt = conn.createStatement();
            String sql,sql2;
            conn.setAutoCommit(false);
            sql ="INSERT INTO USERS (USER_NAME, USER_PASS, NAME,";
	    sql += "STREET_ADDRESS, ZIP_CODE, CITY, COUNTRY) VALUES ( ";
            sql += "'" + pb.getUser() + "', '" + pb.getPassword() + "', '";
	    sql += pb.getName() + "', '" + pb.getStreet() + "', '";
            sql += pb.getZip() +"', '" + pb.getCity() + "', '";
	    sql += pb.getCountry() + "')";
            rs = stmt.executeUpdate(sql);
	    HashMap<String,Boolean> a = pb.getRole();
            Set<String> k = a.keySet();
            Iterator<String> i = k.iterator();
            
            while (i.hasNext()) {
              String st = i.next();
              if(a.get(st)){
	          sql2 = "INSERT INTO USER_ROLES(USER_NAME, ROLE_NAME)";
		  sql2 += "VALUES (" + "'" + pb.getUser() + "', '" + st + "')";
		  rs = stmt.executeUpdate(sql2);
              }
            }
            conn.commit();
	}   
	catch(SQLException sqle){
            conn.rollback();
            throw new Exception(sqle);
	}
        finally {
	    try{
		stmt.close();
            }
	    catch(Exception e) {}
            try {
		conn.close();
            }
            catch(Exception e){}
        }
    }