Setting Up the Database
The instructions that follow explain how to use the 
SavingsAccountEJB example with a Cloudscape database. The Cloudscape software is included with the J2EE SDK download bundle.- From the command-line prompt, run the Cloudscape database server by typing 
cloudscape -start.(When you are ready to shut down the server, typecloudscape -stop.) - Create the 
savingsaccountdatabase table. 
You may also run this example with databases other than Cloudscape. (See the Release Notes of the J2EE SDK for a list of supported databases.) If you are using one of these other databases, you may run the 
j2eetutorial/examples/sql/savingsaccount.sql script to create the savingsaccount table.Deploying the Application
- In 
deploytool, open thej2eetutorial/examples/ears/SavingsAccountApp.earfile (FileOpen).
 - Deploy the 
SavingsAccountAppapplication (ToolsDeploy). In the Introduction dialog box, make sure that you select the Return Client JAR checkbox.
 
Running the Client
- In a terminal window, go to the 
j2eetutorial/examples/earsdirectory. - Set the 
APPCPATHenvironment variable toSavingsAccountAppClient.jar. - Type the following command on a single line:
runclient -client SavingsAccountApp.ear -name SavingsAccountClient -textauth - At the login prompts, enter 
guestfor the user name andguest123for the password. - The client should display the following lines:
balance = 68.25 balance = 32.55 456: 44.77 730: 19.54 268: 100.07 836: 32.55 456: 44.77 4.00 7.00
 
No comments:
Post a Comment