Mērķis: Iepazīties ar sesijas komponentu programmēšanas modeli un jaunu metožu pievienošanu sesijas komponentam.
Darbības īsumā:
long summa(long a,long b) throws RemoteException.
Mērķis: Pievienot metodi, kas no konta noņem norādīto summu.
Darbības īsumā:
Darbību apraksts:
void withdraw(String kontaNumurs,BigDecimal amount) throws RemoteException, InsufficientAmountException,DoesntExistException.
AccountEJBLocal account =
getAccountEJBLocalHome().findByPrimaryKey(kontaNumurs).
try { ... }
catch (InsufficientAmountException ex) {
this.ctx.setRollbackOnly();
throw ex;
} catch (FinderException ex) {
throw new DoesntExistException("Account not found");
} catch (NamingException ex) {
throw new EJBException(ex);
}
ant ear ant deploy