Exercises

A nice short exercise for you today.

The starting point for the exercise is a version of the today's case study that uses the BMTD for the AdvertiseJob bean. Convert the Register bean (that deals with applicants) to use BMTD rather than CMTD. The code to work on is under day08exercise.

The steps you should perform are as follows:

1.
Make sure that you are still using the CMP version of the Agency database. Although you won't be changing them, the Entity EJBs for the exercise are the CMP versions from yesterday.

2.
Update the implementation of the various methods of RegisterBean class, basing it on AdvertiseJobBean. You will probably find it helpful to copy over the 3 helper methods (beginTransactionIfRequired(), statusAsString(), and completeTransactionIfRequired()).

3.
Modify the ddagency_session_ejbs-ejb-jar.xml deployment descriptor, changing RegisterBean to use transaction-type of Bean. You can also remove the RegisterBean's container-transaction elements under the assembly- descriptor element because they will no longer be needed.

4.
Build the enterprise application (agency.ear in the jar directory) and then load it into deploytool. Deploy and complete any information missing from the wizard.

5.
Test your program using the AllClients client, run with run unAll.

The solution is in day08agency.

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

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