final Person person = (Person) RootDomainObject.getInstance().readPartyByOID(personID); if (person != null) { ServiceUtils.executeService(null, "SetUserUID", new Object[] { person } ); }
    public ActionForward generatePassword(ActionMapping mapping, ActionForm form,            HttpServletRequest request, HttpServletResponse response) throws Exception {        HttpSession session = request.getSession();        IUserView userView = (IUserView) session.getAttribute(SessionConstants.U_VIEW);        Integer personID = new Integer(request.getParameter("personID"));        String password = null;        // Change the Password        try {            Object args[] = { personID };            password = (String) ServiceManagerServiceFactory.executeService(userView, "GenerateNewPassword", args);        } catch (FenixServiceException e) {            throw new FenixActionException(e);        }        request.setAttribute("password", password);        InfoPerson infoPerson = null;        try {            Object args[] = { request.getParameter("username") };            infoPerson = (InfoPerson) ServiceManagerServiceFactory.executeService(userView,                    "ReadPersonByUsername", args);        } catch (ExcepcaoInexistente e) {            throw new NonExistingActionException("A Person", e);        }        request.setAttribute("infoPerson", infoPerson);        return mapping.findForward("Success");    }