Exercises

The intention of this day is for you to familiarise yourself with the EJB environment and the use of EJBs. To ensure that you are comfortable with these areas, you should attempt the following tasks.

1.
If you have not already done so, follow the steps to deploy the example Agency EJB from the Day 4 Exercise directory on the CD-ROM.

2.
Examine the information displayed by deploytool and make sure that you can identify where the resource reference for the Agency JDBC connection is set, where the environment reference for the agency name is set, and where the JNDI name of the Agency EJB itself is set.

3.
Use the runSimple script/batch file provided under the Day 4 Exercise directory on the CD-ROM to run the test client. Make sure that this client runs without errors and successfully lists all the customers in the agency database.

4.
Without referring to the example client (but referring to the material you have covered today), create your own simple test client for the Agency EJB from scratch. This should just consist of a command-line client that creates an instance of an Agency EJB and asks it for its name.

5.
Try changing the name under which the EJB is registered in JNDI using deploytool. Change the JNDI name used by your client to find the Agency EJB and make sure that it still works.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.195.111