You're forgetting to decrement/increment accountbalance
. I think this is what you intended to do:
public int accountwithdraw(int amount)
{
accountbalance = accountbalance-amount;
return accountbalance;
}
public int accountdeposit(int amount)
{
accountbalance = accountbalance-amount;
return accountbalance;
}
ps - any particular reason why you're using an annotation in the ejb definition but not for lookup (@EJB
) ? Would be both easier and more portable IMO.