}
List granted = new ArrayList();
//loop through all customers
CustomerRemote customer = null;
for (int i = 1; ; i++){
Integer pk = new Integer(i);
try{
customer = customerHome.findByPrimaryKey(pk);
} catch(FinderException fe){
System.out.println("Find Exception: " + fe.getMessage());
break;
} catch(RemoteException re){
System.out.println("Remote Exception: " + re.getMessage());
break;
}
// Check to see if the annualSalary to loanAmount ratio is not acceptable (<0.1)
try{
double ratio = customer.getAnnualSalary().doubleValue() / customer.getLoanAmount().doubleValue();
if((customer != null)&&(ratio < 0.1)){
granted.add(customer.getName());
}
}catch (RemoteException re){
System.out.println("Remote Exception: " + re.getMessage());
}
}