background image
<< Configuring Visual Cafe | Generating EJB Test Assets >>
<< Configuring Visual Cafe | Generating EJB Test Assets >>

Reverse Engineering

50
Chapter 3 - Testing Enterprise JavaBeans
Adding Account Information to the Rational Bank Account Sample
After the Rational Bank Account window opens, you need to create a few savings
accounts and make deposits to each account. Be sure to keep track of the generated
account numbers and the balance in each account. You will need this information
later when you create the datapool.
To create a new account:
1
Click
Open New Account
.
2
Enter the required account information and click
Execute Transaction
.
3
Write down the number of the new account.
To make a deposit:
1
Click
Deposit
.
2
Enter the account number that was returned when the account was created.
3
Enter the amount you want to deposit.
4
Select
Savings
.
5
Click
Execute Transaction
.
Be sure to keep track of the account balance.
Reverse Engineering a Deployed EJB into Rose
The sample model that is included with the Rational Bank Account sample
application is populated with objects derived from reverse engineering the sample
application's deployed JAR file. You can use this model to generate test assets to test
the sample application. For details, see Generating EJB Test Assets on page 51.
If you already have your own deployed EJBs that you want to test, you can reverse
engineer them into Rose. When you reverse engineer the deployed JAR file, Rose
parses the deployment descriptors in the JAR file and sets up the associations and
stereotypes automatically.
Associations between the various elements in the EJB--the implementation class, the
home interface, the remote interface, and the primary key--are displayed graphically
in the Class diagram.
Special icons are used in the Logical View of the Rose browser to display the various
elements in the EJB.