BEA Logo

EJB 2.0 - Using an EJB within a JSP

 

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

Part A:

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

Current Balance: $ 40900.0
Depositing: $ 100.0

New balance: $ 41000.0

PartB:

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

Received expected Processing Error:Request to withdraw $41010.0 more than balance 41000.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: 12589284658080 with balance: $ 0.0
Created account: 12589284658081 with balance: $ 100.0
Created account: 12589284658082 with balance: $ 200.0
Created account: 12589284658083 with balance: $ 300.0
Created account: 12589284658084 with balance: $ 400.0

Success: 5 accounts successfully created

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

Now Removing the accounts we just created...
Removed account: 12589284658080
Removed account: 12589284658081
Removed account: 12589284658082
Removed account: 12589284658083
Removed account: 12589284658084

Completed EJB operations at Sun Nov 22 14:21:05 PST 2009