background image
<< Deploying Stubs to WebLogic | Deploying Stubs to a Running Server >>
<< Deploying Stubs to WebLogic | Deploying Stubs to a Running Server >>

Adding Stub Files

60
Chapter 3 - Testing Enterprise JavaBeans
Deploying Stubs Permanently to a WebLogic Server
To deploy stubs permanently to a WebLogic server:
1
Shut down the WebLogic application server if it is currently running.
2
Generate the stubs from Rose. For details, see Generating Stubs and Lookup Tables for
the Unit Test
on page 56.
3
Launch Visual Café 4.x if it is not currently running and create a new empty
project.
4
Use
Insert > Files into project
to add the three stub source files into the project. For
example, add the three stub files that were created in Generating Stubs and Lookup
Tables for the Unit Test
on page 56. These three stub files include:
The remote interface,
ManageAccounts.java
The home interface,
ManageAccountsHome.java
The implementation class,
ManageAccountsBean.java
5
Add the required JAR files to the project.
a
Click
Project > Options
and then click the
Directories
tab.
b
Click
New
, the button furthest to the left.
c
Click
file
.
d
Add the required JAR files for test script playback. (See Rational Test Script
Playback Requirements
on page 33.)
e
For WebLogic 5.1, browse to
<RQA
Home>\Samples\ejb\bankacct\vc\ratlbankacct51.jar
and click
Open
.
For WebLogic 6.1, browse to
<RQA
Home>\Samples\ejb\bankacct\vc\ratlbankacct61.jar
and click
Open
.
f
Click
OK
.
6
Save the project and specify a name.
7
Click
Project > Rebuild all
to compile the project.
8
Copy the three compiled class files into a directory named after the package name,
for example,
RationalBankAcct
.
9
Launch a zip utility such as WinZip and open the sample JAR file.
Open ratlbankacct51.jar if you are working in a WebLogic 5.1 environment.
Open ratlbankacct61.jar if you are working in a WebLogic 6.1 environment.