{
setErrorField("inputPassword1", getMessage("password-must-match"));
return;
}
VirtualLibraryEngine vengine = (VirtualLibraryEngine) getEngine();
Login login = (Login) cycle.getPage("Login");
int i = 0;
while (true)
{
try
{
IOperations bean = vengine.getOperations();
Person user =
bean.registerNewUser(getFirstName(), getLastName(), getEmail(), password1);
// Ask the login page to return us to the proper place, as well
// as set a cookie identifying the user for next time.
login.loginUser(user, cycle);
break;
}
catch (RegistrationException ex)
{
setError(ex.getMessage());
return;
}
catch (CreateException ex)
{
throw new ApplicationRuntimeException(ex);
}
catch (RemoteException ex)
{
vengine.rmiFailure("Remote exception registering new user.", ex, i++);
}
}
}