public int getAccountBalance(Integer id)
{
try
{
AccountLocalHome home = (AccountLocalHome)new InitialContext().lookup("AccountLocal");
AccountLocal a = home.findByPrimaryKey(id);
return a.getBalance();
} catch (Exception e)
{
Logger.getLogger(getClass().getName()).info("getAccountBalance failed", e);
throw new EJBException("Could not get account for id " + id, e);
}