Before you can package, deploy, and run the example, you must first set up the Java DB database server with customer and account data, and you must add some resources to the Application Server.
Before you can start this tutorial, the Application Server must be running. For information on starting the Application Server, see Starting and Stopping the Application Server.
To create the database tables used in Duke’s Bank, follow the instructions in Creating the Database Tables in NetBeans IDE.
In Duke’s Bank, the database tables will be created and populated before deploying the application. This happens automatically when you run the deploy task. You can manually reset the database to its original state by following these steps:
In a terminal window or command prompt, go to the tut-install/javaeetutorial5/examples/dukesbank/ directory.
Execute the following command:
ant create-tables |
This task executes the SQL commands contained in tut-install/javaeetutorial5/examples/common/sql/javadb/tutorial.sql. The SQL commands delete any existing tables, create new tables, and insert the initial data in the tables.
To enable the Application Server to determine which users can access enterprise bean methods and resources in the web client, add users and groups to the server’s file security realm using the Admin Console following the procedures described in Managing Users and Groups on the Application Server. Add the users and groups listed in Table 37–3.
Table 37–3 Duke’s Bank Users and Groups
User |
Password |
Group |
---|---|---|
200 |
javaee |
bankCustomer |
bankadmin |
javaee |
bankAdmin |