());
}
catch(SQLException sqlException){
throw new FailedToRegisterException(sqlException.getMessage());
}
catch(CreateException createException){
throw new FailedToRegisterException(createException.getMessage());
}
return nextCustomerID;
}
/**
* this method gets the user password and send that to the user
* in Email
*/
public boolean remindPassword(String email)
{
try{
// get password and send Email
lookupCustomerHome();
System.out.println("Customer Home :"+customerHome);
// uniqueness constraint on email attribute associated
// with customer in database enables us to get first and
// only customer associated with this email
Enumeration customers = customerHome.findByEmail(email);
Customer customerBean = null;
if(customers.hasMoreElements()){
customerBean = (Customer) customers.nextElement();
}
System.out.println("Customer Bean :" +customerBean);
if(customerBean == null){
return false;
}
// look up AuthenticationHome
lookupAuthenticationHome();
Authentication authenticationBean
上一篇:
AuthenticationSession.java
下一篇:
还记得,那年的风车吗?