Exercises

The intention of this day is for you to familiarize 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 Day04/exercise directory on the Web site using deploytool.

  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. From within the Day04/exercise directory run the command “asant verify-j2ee-ri” to verify your application.

  4. Use the appclient command shown in today's lesson and run the SimpleClient example. Make sure that this client runs without errors and successfully lists all the customers in the agency database.

  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.

  6. Use the asant build files instead of deploytool to compile, build, verify and deploy the example Agency application.

  7. Edit the dd/agency/sun-j2ee-ri.xml file (make a backup first of course) and change the JNDI name for the Agency Session EJB. 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
3.22.74.232