BEA Logo

EJB 2.0 - Using an EJB within a JSP

 

Looking up account 10020 ...
Account 10020 found; balance is $3900.0

Part A:

Deposit and attempt to withdraw more than the currentaccount balance. An application-specific exception should be thrown:-

Current Balance: $ 3900.0
Depositing: $ 100.0

New balance: $ 4000.0

PartB:

Withdraw an amount greater thancurrent balance. Expecting an exception...

Received expected Processing Error:Request to withdraw $4010.0 more than balance 4000.0 in account 10020

Part C

Create some new accounts, with different initial balances.Find all the accounts with a balance greater than a specific value.When finished, the new accounts are removed.


Created account: 12690247326880 with balance: $ 0.0
Created account: 12690247326881 with balance: $ 100.0
Created account: 12690247326882 with balance: $ 200.0
Created account: 12690247326883 with balance: $ 300.0
Created account: 12690247326884 with balance: $ 400.0

Success: 5 accounts successfully created

Querying for accounts with a balance greater than 700.0
100001000.0
100051000.0
100204000.0

Now Removing the accounts we just created...
Removed account: 12690247326880
Removed account: 12690247326881
Removed account: 12690247326882
Removed account: 12690247326883
Removed account: 12690247326884

Completed EJB operations at Fri Mar 19 11:52:12 PDT 2010